Skip to content

Commit bc9e563

Browse files
committed
Drop docker related stuff
1 parent 42bc990 commit bc9e563

File tree

8 files changed

+61
-94
lines changed

8 files changed

+61
-94
lines changed

.github/workflows/coding-standards.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ jobs:
1515
- name: "checkout"
1616
uses: "actions/checkout@v4"
1717

18-
- name: "build the environment"
19-
run: "dev/bin/docker-compose build"
18+
- name: "setup php"
19+
uses: "shivammathur/setup-php@v2"
20+
with:
21+
php-version: "latest"
22+
tools: "composer, flex"
2023

21-
- name: "check coding standards"
22-
run: "dev/bin/php php-cs-fixer fix --dry-run --diff --ansi"
24+
- name: "install composer dependencies"
25+
uses: "ramsey/composer-install@v3"
26+
env:
27+
COMPOSER_PREFER_STABLE: 1
2328

24-
- name: clear docker volumes
25-
if: ${{ always() }}
26-
run: dev/bin/docker-compose down --volumes
29+
- name: "check coding standards"
30+
run: "vendor/bin/php-cs-fixer fix --dry-run --diff --ansi"

.github/workflows/static-analysis.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,20 @@ jobs:
1111
static-analysis:
1212
name: "static analysis"
1313
runs-on: "ubuntu-latest"
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
php: ['8.4']
18-
symfony: ['7.2.*']
19-
composer-flags: ['--prefer-stable']
20-
21-
env:
22-
SYMFONY_REQUIRE: ${{ matrix.symfony }}
23-
2414
steps:
2515
- name: "checkout"
2616
uses: "actions/checkout@v4"
2717

28-
- name: "build the environment"
29-
run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} php"
18+
- name: "setup php"
19+
uses: "shivammathur/setup-php@v2"
20+
with:
21+
php-version: "latest"
22+
tools: "composer, flex"
3023

31-
- name: "install dependencies"
32-
run: "dev/bin/php composer update --ansi ${{ matrix.composer-flags }}"
24+
- name: "install composer dependencies"
25+
uses: "ramsey/composer-install@v3"
26+
env:
27+
COMPOSER_PREFER_STABLE: 1
3328

3429
- name: "run phpstan static analysis"
35-
run: "dev/bin/php phpstan --memory-limit=256M --ansi"
36-
37-
- name: clear docker volumes
38-
if: ${{ always() }}
39-
run: dev/bin/docker-compose down --volumes
30+
run: "vendor/bin/phpstan --ansi"

.github/workflows/unit-tests.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,58 @@ on:
55
push: ~
66
schedule:
77
# Do not make it the first of the month and/or midnight since it is a very busy time
8-
- cron: "10 10 5 * *"
8+
- cron: "* 10 5 * *"
99

1010
jobs:
1111
tests:
12-
runs-on: ubuntu-latest
13-
continue-on-error: ${{ matrix.can-fail }}
12+
runs-on: "ubuntu-latest"
13+
continue-on-error: "${{ matrix.can-fail }}"
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php: ['8.1', '8.2', '8.3', '8.4']
18-
symfony: ['6.4.*', '7.1.*', '7.2.*']
19-
doctrine-orm: ['^2.14', '^3.0']
20-
composer-flags: ['--prefer-stable']
17+
php: ["8.1", "8.2", "8.3", "8.4"]
18+
symfony: ["6.4.*", "7.1.*", "7.2.*"]
19+
doctrine-orm: ["^2.14", "^3.0"]
20+
dependency-versions: ["highest"]
21+
composer-stable: ["1"]
2122
can-fail: [false]
2223
include:
2324
- php: "8.1"
2425
symfony: "6.4.*"
2526
doctrine-orm: "^2.14"
26-
composer-flags: '--prefer-stable --prefer-lowest'
27+
dependency-versions: "lowest"
28+
composer-stable: "1"
2729
can-fail: false
2830
exclude:
2931
- php: "8.1"
3032
symfony: "7.1.*"
3133
- php: "8.1"
3234
symfony: "7.2.*"
3335

34-
name: "PHP ${{ matrix.php }} - Doctrine ${{ matrix.doctrine-orm }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
35-
36-
env:
37-
SYMFONY_REQUIRE: ${{ matrix.symfony }}
36+
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Doctrine ORM ${{ matrix.doctrine-orm }} - Composer ${{ matrix.dependency-versions }}"
3837

3938
steps:
4039
- name: "checkout"
4140
uses: "actions/checkout@v4"
4241

43-
- name: "build the PHP environment"
44-
run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.4.0' php"
42+
- name: "setup php"
43+
uses: "shivammathur/setup-php@v2"
44+
with:
45+
php-version: "${{ matrix.php }}"
46+
tools: "composer, flex"
4547

4648
- name: "require specific Doctrine ORM version"
47-
run: "dev/bin/php composer require --ansi ${{ matrix.composer-flags }} --no-install doctrine/orm:${{ matrix.doctrine-orm }}"
48-
49-
- name: "install dependencies"
50-
run: "dev/bin/php composer update --ansi ${{ matrix.composer-flags }}"
49+
env:
50+
COMPOSER_PREFER_STABLE: "${{ matrix.composer-stable }}"
51+
run: "composer require --no-scripts --no-install --dev doctrine/orm:${{ matrix.doctrine-orm }} --ansi"
52+
53+
- name: "install composer dependencies"
54+
uses: "ramsey/composer-install@v3"
55+
env:
56+
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
57+
COMPOSER_PREFER_STABLE: "${{ matrix.composer-stable }}"
58+
with:
59+
dependency-versions: "${{ matrix.dependency-versions }}"
5160

5261
- name: "run unit tests"
53-
run: "dev/bin/php-test vendor/bin/simple-phpunit --colors=always"
54-
55-
- name: clear docker volumes
56-
if: ${{ always() }}
57-
run: dev/bin/docker-compose down --volumes
62+
run: "vendor/bin/simple-phpunit --colors=always"

CONTRIBUTING.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,56 +16,38 @@ We accept contributions via Pull Requests on [Github](https://github.com/thephpl
1616

1717
## Development
1818

19-
[Docker](https://www.docker.com/) and [Docker Compose](https://github.com/docker/compose) are required for the development environment.
19+
[PHP](https://www.php.net/) 8.1+ and [Composer](https://getcomposer.org/) 2+ are required for the development environment.
2020

2121
### Building the environment
2222

23-
Make sure your Docker images are all built and up-to-date using the following command:
23+
Download all the needed packages required to develop the project:
2424

2525
```sh
26-
dev/bin/docker-compose build
26+
composer update --prefer-stable
2727
```
2828

29-
> **NOTE:** You can target a different version of PHP during development by appending the `--build-arg PHP_VERSION=<version>` argument.
30-
31-
After that, download all the needed packages required to develop the project:
32-
33-
```sh
34-
dev/bin/php composer update --prefer-stable
35-
```
36-
37-
### Debugging
38-
39-
You can run the debugger using the following command:
40-
41-
```sh
42-
dev/bin/php-debug vendor/bin/simple-phpunit
43-
```
44-
45-
Make sure your IDE is setup properly, for more information check out the [dedicated documentation](docs/debugging.md).
46-
4729
### Code linting
4830

4931
This bundle enforces the PSR-2 and Symfony code standards during development by using the [PHP CS Fixer](https://cs.symfony.com/) utility. Before committing any code, you can run the utility to fix any potential rule violations:
5032

5133
```sh
52-
dev/bin/php php-cs-fixer fix
34+
vendor/bin/php-cs-fixer fix
5335
```
5436

5537
### Running static analysis
5638

5739
You can run static anaysis of code using the following command:
5840

5941
```sh
60-
dev/bin/php phpstan --memory-limit=256M
42+
vendor/bin/phpstan
6143
```
6244

6345
### Testing
6446

6547
You can run the whole test suite using the following command:
6648

6749
```sh
68-
dev/bin/php-test vendor/bin/simple-phpunit
50+
vendor/bin/simple-phpunit
6951
```
7052

7153
**Happy coding**!

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"ext-pdo_sqlite": "*",
3434
"doctrine/doctrine-bundle": "^2.8.0",
3535
"doctrine/orm": "^2.14|^3.0",
36+
"php-cs-fixer/shim": "^3.38",
37+
"phpstan/phpstan": "^2.1",
38+
"phpstan/phpstan-symfony": "2.0",
3639
"symfony/browser-kit": "^6.4|^7.0",
3740
"symfony/phpunit-bridge": "^7.2"
3841
},

docs/debugging.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

phpstan.dist.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
includes:
2-
- /home/app/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/extension.neon
3-
- /home/app/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-symfony/rules.neon
2+
- ./vendor/phpstan/phpstan-symfony/extension.neon
3+
- ./vendor/phpstan/phpstan-symfony/rules.neon
44

55
parameters:
66
level: 8

tests/Fixtures/FixtureFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Development hints:
2222
*
2323
* You can easily generate token identifiers using the following command:
24-
* --- dev/bin/php -r "echo bin2hex(random_bytes(40)) . PHP_EOL;"
24+
* --- php -r "echo bin2hex(random_bytes(40)) . PHP_EOL;"
2525
*/
2626
final class FixtureFactory
2727
{

0 commit comments

Comments
 (0)