Skip to content

Commit c184e12

Browse files
Vitexusclaude
andcommitted
feat: replace bundled kint with system php-kint-php-kint package
Remove kint vendor copy from debian/rules and the bundled spl_autoload_register block from debian/autoload.php. Use system /usr/share/php/Kint/autoload.php instead and add php-kint-php-kint to package Depends. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a3b9d0b commit c184e12

3 files changed

Lines changed: 2 additions & 20 deletions

File tree

debian/autoload.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
require_once '/usr/share/php/Psr/Http/Message/autoload.php';
1313
require_once '/usr/share/php/Psr/Http/Message/factory-autoload.php';
1414
require_once '/usr/share/php/League/OAuth2/Client/autoload.php';
15-
16-
// Bundled vendor helpers (no Debian package available)
17-
require_once '/usr/lib/csas-authorize/vendor/kint_init.php';
15+
require_once '/usr/share/php/Kint/autoload.php';
1816

1917
// System CSasAccounts library (SpojeNet\CSas\Accounts\*, SpojeNet\CSas\Modes\*, etc.)
2018
spl_autoload_register(function (string $class): void {
@@ -38,17 +36,6 @@
3836
}
3937
});
4038

41-
// Bundled vendor packages (no Debian equivalent)
42-
spl_autoload_register(function (string $class): void {
43-
if (str_starts_with($class, 'Kint\\')) {
44-
$file = '/usr/lib/csas-authorize/vendor/Kint/'
45-
. str_replace('\\', '/', substr($class, 5)) . '.php';
46-
if (file_exists($file)) {
47-
require $file;
48-
}
49-
}
50-
});
51-
5239
(function (): void {
5340
$versions = [];
5441
foreach (\Composer\InstalledVersions::getAllRawData() as $d) {

debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Depends:
2222
php-vitexsoftware-ease-bootstrap5-widgets,
2323
php-vitexsoftware-ease-fluentpdo,
2424
php-spojenet-csas-accountsapi,
25+
php-kint-php-kint,
2526
php-league-oauth2-client,
2627
php-guzzlehttp-guzzle,
2728
php-guzzlehttp-promises,

debian/rules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@ PKG_VERSION := $(shell dpkg-parsechangelog -S Version | sed 's/~.*//')
44
PKG_SOURCE := $(shell jq -r '.name' composer.json)
55
PKG_TYPE := $(shell jq -r '.type' composer.json)
66

7-
BUNDLED := debian/csas-authorize/usr/lib/csas-authorize/vendor
8-
97
%:
108
dh $@
119

1210
override_dh_install:
1311
dh_install
14-
# Bundle vendor packages that have no Debian equivalent
15-
install -d $(BUNDLED)
16-
cp -r vendor/kint-php/kint/src $(BUNDLED)/Kint
17-
cp vendor/kint-php/kint/init.php $(BUNDLED)/kint_init.php
1812
# Install static autoloader
1913
install -m 644 debian/autoload.php \
2014
debian/csas-authorize/usr/share/csas-authorize/autoload.php

0 commit comments

Comments
 (0)