Skip to content

Commit

Permalink
Deprecate DTOs/ValueObjects getters/setters in favor of direct acces … (
Browse files Browse the repository at this point in the history
#458)

* Deprecate DTOs/ValueObjects getters/setters in favor of direct access to the property
  • Loading branch information
Spomky committed Jul 30, 2023
1 parent 8d78f43 commit 87895ca
Show file tree
Hide file tree
Showing 187 changed files with 2,700 additions and 2,065 deletions.
51 changes: 42 additions & 9 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
coverage: "none"

- name: "Checkout code"
Expand All @@ -46,7 +46,7 @@ jobs:
- name: "Check source code for syntax errors"
run: "composer exec -- parallel-lint src/ tests/"

unit_tests:
php_tests:
name: "2️⃣ Unit and functional tests"
needs:
- "byte_level"
Expand All @@ -57,6 +57,8 @@ jobs:
- "ubuntu-latest"
php-version:
- "8.1"
- "8.2"
- "8.3"
dependencies:
- "lowest"
- "highest"
Expand All @@ -83,9 +85,6 @@ jobs:
- name: "Execute tests (PHP)"
run: "make ci-cc"

- name: "Execute tests (JS)"
run: "make js"

- name: "Fix code coverage paths"
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml

Expand All @@ -95,6 +94,40 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

js_tests:
name: "2️⃣ JS tests"
needs:
- "byte_level"
- "syntax_errors"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.2"
runs-on: ${{ matrix.operating-system }}
steps:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "ctype, curl, dom, json, libxml, mbstring, openssl, phar, simplexml, sodium, tokenizer, xml, xmlwriter, zlib"
coverage: "xdebug"

- name: "Checkout code"
uses: "actions/checkout@v3.5.2"
with:
fetch-depth: 0

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--optimize-autoloader"

- name: "Execute tests (JS)"
run: "make js"

static_analysis:
name: "3️⃣ Static Analysis"
needs:
Expand All @@ -105,7 +138,7 @@ jobs:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
extensions: "ctype, curl, dom, json, libxml, mbstring, openssl, phar, simplexml, sodium, tokenizer, xml, xmlwriter, zlib"
coverage: "none"

Expand Down Expand Up @@ -137,7 +170,7 @@ jobs:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
extensions: "ctype, curl, dom, json, libxml, mbstring, openssl, phar, simplexml, sodium, tokenizer, xml, xmlwriter, zlib"
coverage: "none"

Expand Down Expand Up @@ -170,7 +203,7 @@ jobs:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
extensions: "ctype, curl, dom, json, libxml, mbstring, openssl, phar, simplexml, sodium, tokenizer, xml, xmlwriter, zlib"
coverage: "xdebug"

Expand Down Expand Up @@ -199,7 +232,7 @@ jobs:
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.1"
php-version: "8.2"
extensions: "ctype, curl, dom, json, libxml, mbstring, openssl, phar, simplexml, sodium, tokenizer, xml, xmlwriter, zlib"
coverage: "xdebug"

Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/merge-me.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ yarn.lock
yarn-error.log
/composer.lock
/vendor
/.phpunit.cache/
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "^10.1",
"psr/log": "^3.0",
"qossmic/deptrac-shim": "^1.0",
"rector/rector": "^0.17",
"roave/security-advisories": "dev-latest",
Expand All @@ -121,10 +120,9 @@
"symfony/filesystem": "^6.1",
"symfony/finder": "^6.1",
"symfony/monolog-bundle": "^3.8",
"symfony/phpunit-bridge": "^6.1",
"symfony/var-dumper": "^6.1",
"symfony/yaml": "^6.1",
"symplify/easy-coding-standard": "^11.1",
"symplify/easy-coding-standard": "^12.0",
"web-token/jwt-key-mgmt": "^3.1",
"web-token/jwt-signature-algorithm-ecdsa": "^3.1",
"web-token/jwt-signature-algorithm-eddsa": "^3.1",
Expand Down
2 changes: 1 addition & 1 deletion deptrac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ parameters:
- 'Vendors'
- 'Webauthn'
- 'MetadataService'
StimulusBundle:
skip_violations:
Webauthn\Bundle\Service\AuthenticatorAssertionResponseValidator:
- Webauthn\Util\CoseSignatureFixer
- Webauthn\U2FPublicKey
9 changes: 2 additions & 7 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestAnnotationFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestCaseStaticMethodCallsFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestClassRequiresCoversFixer;
use PhpCsFixer\Fixer\ReturnNotation\SimplifiedNullReturnFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer;
Expand All @@ -31,9 +30,8 @@
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

$header = '';

return static function (ECSConfig $config) use ($header): void {
return static function (ECSConfig $config): void {
$header = '';
$config->import(SetList::PSR_12);
$config->import(SetList::CLEAN_CODE);
$config->import(SetList::DOCTRINE_ANNOTATIONS);
Expand Down Expand Up @@ -94,9 +92,6 @@
],
]);

$config->services()
->remove(PhpUnitTestClassRequiresCoversFixer::class);

$config->parallel();
$config->paths([
__DIR__ . '/src',
Expand Down
Loading

0 comments on commit 87895ca

Please sign in to comment.