Skip to content

Commit

Permalink
Transfer data related code to a separate package (#192)
Browse files Browse the repository at this point in the history
* Transfer data related code to a separate package

* Update README.md [skip ci]

* Release preparations (#193)

* Update docs [skip ci]

* Update PR template [skip ci]

* Add composer require checker

* Change version for CRC

* Fix CRC (WIP), use symfony/console directly

* Remove remaining ExitCode occurence

* Exclude PHP 8.0 from CI

* Add symfony finder as a dependency

* Add cycle/database dependency, bump versions

* Fix remaining CRC issues

* Add rector

* Apply Rector changes (CI)

* Apply fixes from StyleCI

* Min MSI 100%

* Remove remaining links [skip ci]

* Remove extra line [skip ci]

* Update .github/workflows/composer-require-checker.yml

Co-authored-by: Sergei Predvoditelev <[email protected]>

* Revert some Rector changes

* Change push rules for CI (review fix)

* Update README.md

Co-authored-by: Sergei Predvoditelev <[email protected]>

* Update rector.php

Co-authored-by: Sergei Predvoditelev <[email protected]>

* Apply Rector changes (CI)

* Change rules for CI, BC (review fix)

* Drop 4 version of Psalm

---------

Co-authored-by: arogachev <[email protected]>
Co-authored-by: StyleCI Bot <[email protected]>
Co-authored-by: Sergei Predvoditelev <[email protected]>

* Remove Scrutinizer

* Sync wording in the guide [skip ci]

---------

Co-authored-by: arogachev <[email protected]>
Co-authored-by: StyleCI Bot <[email protected]>
Co-authored-by: Sergei Predvoditelev <[email protected]>
  • Loading branch information
4 people authored Mar 13, 2024
1 parent cfcc2f6 commit 2beb52f
Show file tree
Hide file tree
Showing 97 changed files with 274 additions and 2,351 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/docs export-ignore
Expand Down
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
| Is bugfix? | ✔️/❌
| New feature? | ✔️/❌
| Breaks BC? | ✔️/❌
| Fixed issues | comma-separated list of tickets # fixed by the PR, if any
42 changes: 31 additions & 11 deletions .github/workflows/bc.yml_
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
on:
- pull_request
- push
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'phpunit.xml.dist'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'

name: backwards compatibility

jobs:
roave_bc_check:
name: Roave BC Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
roave_bc_check:
uses: yiisoft/actions/.github/workflows/bc.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.3']
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand Down Expand Up @@ -38,7 +39,6 @@ jobs:
- windows-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'

name: Composer require checker

jobs:
composer-require-checker:
uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1', '8.2', '8.3']
4 changes: 3 additions & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'psalm.xml'

push:
branches: ['master']
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -26,6 +27,7 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.2']
['8.3']
min-covered-msi: 100
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
21 changes: 21 additions & 0 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

name: rector

jobs:
rector:
uses: yiisoft/actions/.github/workflows/rector.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.3']
35 changes: 0 additions & 35 deletions .scrutinizer.yml

This file was deleted.

32 changes: 2 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,8 @@ Read more in the [official documentation](https://cycle-orm.dev/docs/readme/2.x)

## Documentation

- [English](docs/en/README.md)
- [Russian](docs/ru/README.md)
- [Spanish](docs/es/README.md)

## Testing

### Unit testing

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

```shell
./vendor/bin/phpunit
```

### Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:

```shell
./vendor/bin/roave-infection-static-analysis-plugin
```

### Static analysis

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:

```shell
./vendor/bin/psalm
```
- Guide: [English](docs/en/guide), [Russian](docs/ru/guide), [Spanish](docs/es/guide)
- [Internals](docs/internals.md)

## License

Expand Down
19 changes: 19 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"symbol-whitelist" : [
"JetBrains\\PhpStorm\\ExpectedValues",
"JetBrains\\PhpStorm\\Pure"
],
"php-core-extensions" : [
"Core",
"date",
"json",
"hash",
"pcre",
"Phar",
"Reflection",
"SPL",
"random",
"standard"
],
"scan-files" : []
}
23 changes: 15 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,38 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.0",
"cycle/annotated": "^3.2.1",
"php": "^8.1",
"cycle/annotated": "^3.5",
"cycle/database": "^2.8",
"cycle/migrations": "^3.1.1|^4.0",
"cycle/orm": "^2.2.2",
"cycle/orm": "^2.7",
"cycle/schema-migrations-generator": "^2.0",
"cycle/schema-renderer": "^1.2",
"cycle/schema-builder": "^2.7",
"cycle/schema-builder": "^2.8",
"cycle/schema-provider": "^1.0",
"psr/container": "^2.0",
"psr/event-dispatcher": "^1.0",
"psr/log": "^3.0",
"psr/simple-cache": "^2.0|^3.0",
"spiral/attributes": "^2.7|^3.0",
"webmozart/glob": "^4.0",
"spiral/core": "^3.12",
"spiral/tokenizer": "^3.12",
"webmozart/glob": "^4.7",
"yiisoft/aliases": "^1.1|^2.0|^3.0",
"yiisoft/data": "^1.0",
"yiisoft/friendly-exception": "^1.1",
"yiisoft/injector": "^1.1",
"yiisoft/yii-console": "^2.0"
"symfony/console": "^6.4",
"symfony/finder":"^5.4"
},
"require-dev": {
"cycle/entity-behavior": "^1.0",
"jetbrains/phpstorm-attributes": "^1.0",
"maglnet/composer-require-checker": "^4.3",
"phpunit/phpunit": "^9.6",
"rector/rector": "^1.0",
"roave/infection-static-analysis-plugin": "^1.25",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.30|^5.7",
"vimeo/psalm": "^5.7",
"yiisoft/definitions": "^3.2",
"yiisoft/di": "^1.2",
"yiisoft/test-support": "^3.0"
Expand Down
Loading

0 comments on commit 2beb52f

Please sign in to comment.