Removed autoload files
This commit is contained in:
parent
b68941be2d
commit
7ec772a11a
4 changed files with 100 additions and 41 deletions
2
Makefile
2
Makefile
|
@ -51,7 +51,7 @@ redist: autoload
|
|||
cp src/installer/hash_check.php build/src/hash_check.php; php build/src/hash_check.php; rm build/src/hash_check.php
|
||||
cp src/installer/generate_build_files.php build/src/generate_build_files.php; php build/src/generate_build_files.php; rm build/src/generate_build_files.php
|
||||
|
||||
tar:
|
||||
tar: redist
|
||||
cd build/src; tar -czvf ../ncc.tar.gz *
|
||||
|
||||
clean:
|
||||
|
|
|
@ -0,0 +1,94 @@
|
|||
# Building NCC from source
|
||||
|
||||
Building NCC from source is easy with very few requirements
|
||||
to start building. At the moment ncc can only be debugged
|
||||
or tested by building a redistributable source and
|
||||
installing it.
|
||||
|
||||
## Requirements to build
|
||||
|
||||
- php8.0+
|
||||
- php-mbstring
|
||||
- php-ctype
|
||||
- php-tokenizer *(or php-common)*
|
||||
- make
|
||||
- phpab
|
||||
- tar *(optional)*
|
||||
|
||||
## Installing phpab
|
||||
|
||||
phpab is also known as [PHP Autoload Builder](https://github.com/theseer/Autoload),
|
||||
phpab is an open source tool used for creating autoload
|
||||
files, ncc needs this tool in order to generate it's
|
||||
autoload files whenever there's any changes to its source
|
||||
code.
|
||||
|
||||
This tool is only required for building and or creating a
|
||||
redistributable package of ncc. This component is not
|
||||
required to be installed to use ncc.
|
||||
|
||||
for some components that require static loading, ncc will
|
||||
automatically load it using it's own
|
||||
[autoloader](../src/autoload/autoload.php)
|
||||
|
||||
The recommended way to install phpab is by using [phive](https://phar.io/),
|
||||
if you don't have phive installed you can install it by
|
||||
running these commands in your terminal (from the official documentation)
|
||||
|
||||
```shell
|
||||
wget -O phive.phar https://phar.io/releases/phive.phar
|
||||
wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
|
||||
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79
|
||||
gpg --verify phive.phar.asc phive.phar
|
||||
chmod +x phive.phar
|
||||
sudo mv phive.phar /usr/local/bin/phive
|
||||
```
|
||||
|
||||
Once phive is installed, you can run the final command to
|
||||
install phpab
|
||||
```shell
|
||||
phive install phpab
|
||||
```
|
||||
|
||||
**Note:** Optionally, you may want to have `phab` available in your
|
||||
`$PATH`, this can be done with this command. *(Replace `x.xx.x` with your
|
||||
version number)*
|
||||
|
||||
```shell
|
||||
ln -s /home/user/.phive/phars/phpab-x.xx.x.phar /usr/bin/phpab
|
||||
```
|
||||
|
||||
## Building NCC
|
||||
|
||||
First, navigate to the main directory of NCC's source code
|
||||
where the [Makefile](../Makefile) is present. If you
|
||||
already attempted to or had built ncc before, it's
|
||||
recommended to use `make clean` before building.
|
||||
|
||||
|
||||
### Redist
|
||||
|
||||
Running `redist` from the Makefile will generate all the
|
||||
required autoloaders for ncc and move all the required
|
||||
files into one redistributable source folder under a
|
||||
directory called `build/src`
|
||||
|
||||
```shell
|
||||
make redist
|
||||
```
|
||||
|
||||
|
||||
### Tar
|
||||
|
||||
Running `tar` will run redist before packaging the
|
||||
redistributable source into a tar.gz file that can
|
||||
be distributed to other machines, this process is not
|
||||
a requirement.
|
||||
|
||||
```shell
|
||||
make tar
|
||||
```
|
||||
|
||||
Once you have a populated `build/src` folder, you can
|
||||
simply run execute the `installer` file to install your
|
||||
build of ncc onto the running machine.
|
|
@ -0,0 +1,5 @@
|
|||
[php]
|
||||
executable_path=/usr/bin/php
|
||||
|
||||
[ncc]
|
||||
data_directory=/
|
40
src/ncc/ThirdParty/Symfony/Uid/autoload_spl.php
vendored
40
src/ncc/ThirdParty/Symfony/Uid/autoload_spl.php
vendored
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
// @codingStandardsIgnoreFile
|
||||
// @codeCoverageIgnoreStart
|
||||
// this is an autogenerated file - do not edit
|
||||
spl_autoload_register(
|
||||
function($class) {
|
||||
static $classes = null;
|
||||
if ($classes === null) {
|
||||
$classes = array(
|
||||
'ncc\\thirdparty\\symfony\\uid\\abstractuid' => '/AbstractUid.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\binaryutil' => '/BinaryUtil.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\command\\generateulidcommand' => '/Command/GenerateUlidCommand.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\command\\generateuuidcommand' => '/Command/GenerateUuidCommand.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\command\\inspectulidcommand' => '/Command/InspectUlidCommand.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\command\\inspectuuidcommand' => '/Command/InspectUuidCommand.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\factory\\namebaseduuidfactory' => '/Factory/NameBasedUuidFactory.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\factory\\randombaseduuidfactory' => '/Factory/RandomBasedUuidFactory.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\factory\\timebaseduuidfactory' => '/Factory/TimeBasedUuidFactory.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\factory\\ulidfactory' => '/Factory/UlidFactory.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\factory\\uuidfactory' => '/Factory/UuidFactory.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\nilulid' => '/NilUlid.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\niluuid' => '/NilUuid.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\ulid' => '/Ulid.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\uuid' => '/Uuid.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\uuidv1' => '/UuidV1.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\uuidv3' => '/UuidV3.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\uuidv4' => '/UuidV4.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\uuidv5' => '/UuidV5.php',
|
||||
'ncc\\thirdparty\\symfony\\uid\\uuidv6' => '/UuidV6.php'
|
||||
);
|
||||
}
|
||||
$cn = strtolower($class);
|
||||
if (isset($classes[$cn])) {
|
||||
require __DIR__ . $classes[$cn];
|
||||
}
|
||||
},
|
||||
true,
|
||||
false
|
||||
);
|
||||
// @codeCoverageIgnoreEnd
|
Loading…
Add table
Reference in a new issue