Skip to content

Commit 9a35d28

Browse files
committed
Migrace na Debian PHP autoloader systém
- Aktualizován debian/README.Debian s instrukcemi pro Debian autoloader - Přechod z vendor/autoload.php na /usr/share/php/*/autoload.php - Využití pkg-php-tools a phpab pro generování autoloaderu - Dokumentace pro migraci existujících aplikací
1 parent 4bfcd16 commit 9a35d28

1 file changed

Lines changed: 46 additions & 29 deletions

File tree

debian/README.Debian

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,48 @@
1-
Subreg PHP library Debian package
2-
------------------------------
1+
php-spojenet-subreg for Debian
2+
===============================
33

4-
Debian/Ubuntu
5-
-------------
4+
PHP Autoloader
5+
--------------
66

7-
For Linux, .deb packages are available. Please use the repository:
7+
This package uses the **Debian PHP autoloader system** (pkg-php-tools).
88

9+
Classes are installed in: `/usr/share/php/Subreg`
10+
Autoloader: `/usr/share/php/Subreg/autoload.php`
11+
12+
To use in your PHP code:
13+
14+
```php
15+
require_once '/usr/share/php/Subreg/autoload.php';
916
```
10-
sudo apt install lsb-release wget apt-transport-https bzip2
1117

12-
wget -qO- https://repo.vitexsoftware.com/keyring.gpg | sudo tee /etc/apt/trusted.gpg.d/vitexsoftware.gpg
13-
echo "deb [signed-by=/etc/apt/trusted.gpg.d/vitexsoftware.gpg] https://repo.vitexsoftware.com $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
18+
The autoloader is automatically generated by `phpab` during package build and
19+
includes all package classes with proper dependency loading.
20+
21+
**Note:** This package NO LONGER ships vendor/autoload.php from Composer.
22+
Use the Debian autoloader instead for proper system integration.
23+
24+
Installation
25+
------------
26+
27+
For Debian, Ubuntu & friends please use repo:
28+
29+
```shell
30+
sudo apt install lsb-release wget
31+
echo "deb http://repo.vitexsoftware.cz $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
32+
sudo wget -O /etc/apt/trusted.gpg.d/vitexsoftware.gpg http://repo.vitexsoftware.cz/keyring.gpg
1433
sudo apt update
1534
sudo apt install php-spojenet-subreg
1635
```
1736

18-
In this case, you need to add the following to the composer.json file of your application:
37+
Composer Integration
38+
--------------------
39+
40+
If using Composer in your application, you can reference the Debian package:
1941

2042
```json
43+
{
2144
"require": {
22-
"php-subreg": "*",
23-
"ease-core": "*"
45+
"deb/spojenet-subreg": "*"
2446
},
2547
"repositories": [
2648
{
@@ -29,31 +51,26 @@ In this case, you need to add the following to the composer.json file of your ap
2951
"options": {
3052
"symlink": true
3153
}
32-
},
33-
{
34-
"type": "path",
35-
"url": "/usr/share/php/EaseCore",
36-
"options": {
37-
"symlink": true
38-
}
3954
}
4055
]
56+
}
4157
```
4258

43-
So, when installing dependencies, it will look something like this:
59+
Migration from Composer vendor/autoload.php
60+
--------------------------------------------
4461

45-
Loading composer repositories with package information
46-
Installing dependencies from lock file
47-
- Installing ease-core (1.1.3.3)
48-
Symlinked from /usr/share/php/Ease
62+
If you're migrating from Composer's autoloader, replace:
4963

50-
- Installing php-subreg (0.2.1)
51-
Symlinked from /usr/share/php/Subreg
52-
53-
And updates can be done globally for the entire system via apt-get.
64+
```php
65+
require_once __DIR__ . '/../vendor/autoload.php';
66+
```
5467

68+
with:
5569

56-
Is installed by standard way in /usr/share/php/Subreg
70+
```php
71+
require_once '/usr/share/php/Subreg/autoload.php';
72+
```
5773

58-
-- Vítězslav Dvořák <vitex@hippy.cz> Sun Oct 21 15:17:56 CEST 2012
74+
This ensures you're using the system-wide Debian packages instead of bundled dependencies.
5975

76+
-- VitexSoftware <info@vitexsoftware.cz> Tue Mar 03 23:31:37 CET 2026

0 commit comments

Comments
 (0)