A gateway/firewall task to be able to talk someone about the real job
Fibinger Ádám
2021-10-22 3f95d8278fc20cdc53936ee8eac2361a12440312
Documentation, Composer and test configuration fixes
3 files modified
1 files added
50 ■■■■■ changed files
README.md 26 ●●●● patch | view | raw | blame | history
bin/phpunit 19 ●●●●● patch | view | raw | blame | history
composer.json 4 ●●●● patch | view | raw | blame | history
phpunit.xml 1 ●●●● patch | view | raw | blame | history
README.md
@@ -25,9 +25,10 @@
```
git clone https://shr:yRmglFOqNMbwpnuhP5iy@git.unr.hu/r/shoprenter-secretserver.git secretserver.website.tld
cd secretserver.website.tld
composer install --no-dev
```
This is gonna create an Sqlite DB (or anything else if you changed the config) with the correct schema (you can check the .env file about the details) in the project dir (`var/data.db`):
This is will create an Sqlite DB (or anything else if you changed the config) with the correct schema (you can check the .env file about the details) in the project dir (`var/data.db`):
```
php bin/console doctrine:database:create
@@ -55,7 +56,26 @@
#### Locally
Fire up this baby:
`symfony server:start`
```
symfony server:start
```
### Deploy
Only god knows what you are using (Apache, Nginx, Windows Server), you can configure as a normal symfony project: https://symfony.com/doc/current/setup/web_server_configuration.html
Only God knows what you are using (Apache, Nginx, Windows Server), you can configure as a normal symfony project: https://symfony.com/doc/current/setup/web_server_configuration.html
## Testing
### Installing dev libraries
If you followed point-by-point your version of the project does not contains dev libraries, you have to install it:
```
composer install
```
And get the tests running:
```
php bin/phpunit
```
Probably you will get some errors, most likely the recent removal of monolog from default Symfony install.
My only option would be to mask up, but I prefer not to: https://github.com/liip/LiipTestFixturesBundle/issues/135
### Questions
Are welcome @ (vfiber@gmail.com)[mailto:vfiber@gmail.com] / (adam.fibinger@gmail.com)[mailto:adam.fibinger@gmail.com]
bin/phpunit
New file
@@ -0,0 +1,19 @@
#!/usr/bin/env php
<?php
if (!ini_get('date.timezone')) {
    ini_set('date.timezone', 'UTC');
}
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
    define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
    require PHPUNIT_COMPOSER_INSTALL;
    PHPUnit\TextUI\Command::main();
} else {
    if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
        echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
        exit(1);
    }
    require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}
composer.json
@@ -31,13 +31,13 @@
        "symfony/serializer": "5.3.*",
        "symfony/twig-bundle": "5.3.*",
        "symfony/validator": "5.3.*",
        "symfony/yaml": "5.3.*"
        "symfony/yaml": "5.3.*",
        "symfony/maker-bundle": "^1.34"
    },
    "require-dev": {
        "justinrainbow/json-schema": "^5.2",
        "phpunit/phpunit": "^9.5",
        "symfony/css-selector": "5.3.*",
        "symfony/maker-bundle": "^1.34",
        "symfony/phpunit-bridge": "^5.3"
    },
    "config": {
phpunit.xml
@@ -13,6 +13,7 @@
        <server name="SHELL_VERBOSITY" value="-1" />
        <server name="SYMFONY_PHPUNIT_REMOVE" value="" />
        <server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
        <server name="KERNEL_CLASS" value="App\Kernel" />
    </php>
    <testsuites>