Skip to content

Commit a5dda56

Browse files
Vitexusclaude
andcommitted
fix: replace bundled guzzlehttp/psr with system Debian packages
php-guzzlehttp-guzzle, php-guzzlehttp-promises, php-guzzlehttp-psr7, php-psr-http-client, php-psr-http-factory and php-psr-http-message are all available in Debian stable. Use system autoload paths instead of bundling from vendor/. Only league/oauth2-client, kint and getallheaders still lack Debian packages and remain bundled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9031ff0 commit a5dda56

3 files changed

Lines changed: 8 additions & 19 deletions

File tree

debian/autoload.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
require_once '/usr/share/php/EaseHtml/autoload.php';
99
require_once '/usr/share/php/EaseHtmlWidgets/autoload.php';
1010
require_once '/usr/share/php/EaseFluentPDO/autoload.php';
11+
require_once '/usr/share/php/GuzzleHttp/autoload.php';
12+
require_once '/usr/share/php/Psr/Http/Message/autoload.php';
13+
require_once '/usr/share/php/Psr/Http/Message/factory-autoload.php';
1114

12-
// Bundled vendor helpers (files autoload)
15+
// Bundled vendor helpers (no Debian package available)
1316
require_once '/usr/lib/csas-authorize/vendor/getallheaders.php';
1417
require_once '/usr/lib/csas-authorize/vendor/kint_init.php';
15-
require_once '/usr/lib/csas-authorize/vendor/GuzzleHttp/functions_include.php';
1618

1719
// System CSasAccounts library (SpojeNet\CSas\Accounts\*, SpojeNet\CSas\Modes\*, etc.)
1820
spl_autoload_register(function (string $class): void {
@@ -36,16 +38,11 @@
3638
}
3739
});
3840

39-
// Bundled vendor packages
41+
// Bundled vendor packages (no Debian equivalent)
4042
spl_autoload_register(function (string $class): void {
4143
$map = [
42-
'League\\OAuth2\\Client\\' => '/usr/lib/csas-authorize/vendor/League/OAuth2/Client/',
43-
'GuzzleHttp\\Psr7\\' => '/usr/lib/csas-authorize/vendor/GuzzleHttp/Psr7/',
44-
'GuzzleHttp\\Promise\\' => '/usr/lib/csas-authorize/vendor/GuzzleHttp/Promise/',
45-
'GuzzleHttp\\' => '/usr/lib/csas-authorize/vendor/GuzzleHttp/',
46-
'Psr\\Http\\Client\\' => '/usr/lib/csas-authorize/vendor/Psr/Http/Client/',
47-
'Psr\\Http\\Message\\' => '/usr/lib/csas-authorize/vendor/Psr/Http/Message/',
48-
'Kint\\' => '/usr/lib/csas-authorize/vendor/Kint/',
44+
'League\\OAuth2\\Client\\' => '/usr/lib/csas-authorize/vendor/League/OAuth2/Client/',
45+
'Kint\\' => '/usr/lib/csas-authorize/vendor/Kint/',
4946
];
5047
foreach ($map as $prefix => $base) {
5148
if (str_starts_with($class, $prefix)) {

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Priority: optional
77
Homepage: https://github.com/Spoje-NET/csas-authorize
88

99
Package: csas-authorize
10-
Depends: ${misc:Depends}, composer, php-intl, php-vitexsoftware-ease-bootstrap5, php-vitexsoftware-ease-html-widgets (>= 1.1.1), php-vitexsoftware-ease-bootstrap5-widgets, php-vitexsoftware-ease-fluentpdo, php-spojenet-csas-accountsapi, php-robmorgan-phinx | php-cakephp-phinx, csas-authorize-sqlite | csas-authorize-mysql
10+
Depends: ${misc:Depends}, composer, php-intl, php-vitexsoftware-ease-bootstrap5, php-vitexsoftware-ease-html-widgets (>= 1.1.1), php-vitexsoftware-ease-bootstrap5-widgets, php-vitexsoftware-ease-fluentpdo, php-spojenet-csas-accountsapi, php-guzzlehttp-guzzle, php-guzzlehttp-promises, php-guzzlehttp-psr7, php-psr-http-client, php-psr-http-factory, php-psr-http-message, php-robmorgan-phinx | php-cakephp-phinx, csas-authorize-sqlite | csas-authorize-mysql
1111
Architecture: all
1212
Section: web
1313
Priority: optional

debian/rules

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ override_dh_install:
1414
# Bundle vendor packages that have no Debian equivalent
1515
install -d $(BUNDLED)/League/OAuth2
1616
cp -r vendor/league/oauth2-client/src $(BUNDLED)/League/OAuth2/Client
17-
cp -r vendor/guzzlehttp/guzzle/src $(BUNDLED)/GuzzleHttp
18-
cp -r vendor/guzzlehttp/psr7/src $(BUNDLED)/GuzzleHttp/Psr7
19-
cp -r vendor/guzzlehttp/promises/src $(BUNDLED)/GuzzleHttp/Promise
20-
install -d $(BUNDLED)/Psr/Http
21-
cp -r vendor/psr/http-message/src $(BUNDLED)/Psr/Http/Message
22-
cp vendor/psr/http-factory/src/*.php $(BUNDLED)/Psr/Http/Message/
23-
install -d $(BUNDLED)/Psr/Http/Client
24-
cp vendor/psr/http-client/src/*.php $(BUNDLED)/Psr/Http/Client/
2517
cp vendor/ralouphie/getallheaders/src/getallheaders.php $(BUNDLED)/getallheaders.php
2618
cp -r vendor/kint-php/kint/src $(BUNDLED)/Kint
2719
cp vendor/kint-php/kint/init.php $(BUNDLED)/kint_init.php

0 commit comments

Comments
 (0)