-
Notifications
You must be signed in to change notification settings - Fork 14
Update to php8.1 symfony 6.4 #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
dad3a20
change branch name
xh3n1 9e4e996
Disable REST API by default
xh3n1 7d2145f
Change path
xh3n1 81fd339
Remove prefix
xh3n1 30fde0d
[FEATURE] Get the number of subscribers of list and added tests (#116)
xh3n1 8fca0ef
[BUGFIX] Fix the expected number in an integration test (#119)
xh3n1 4364ded
[CLEANUP] Fix a warning with newer PHPMD versions (#125)
26ea3c8
update php dependencies
michield 110b25d
update to pass building
michield c07cee1
ISSUE-337: update package versions
tatevikg1 b687537
ISSUE-337: use local
tatevikg1 85ab9ce
ISSUE-337: symfony 6.4
tatevikg1 f09b1f9
ISSUE-337: test fix
tatevikg1 bf004d0
ISSUE-337: fix the rest of tests
tatevikg1 86b26f6
GitHub actions (#132)
nfebe a35a7d5
ISSUE-337: add pipeline
tatevikg1 276d397
ISSUE-337: fix phpstan
tatevikg1 acec73c
ISSUE-337: fix phpstmd
tatevikg1 3453581
ISSUE-337: openapi docs
tatevikg1 1986e45
merge main
tatevikg1 2e8300a
ISSUE-337: move to bundle file
tatevikg1 b483207
ISSUE-337: changelog
tatevikg1 884fb1e
ISSUE-337: update core
tatevikg1 8ad8004
ISSUE-337: fix phpstan
tatevikg1 7502393
ISSUE-337: fix phpcs
tatevikg1 1e4294c
ISSUE-337: force push
tatevikg1 2ce9ae1
ISSUE-337: name fix
tatevikg1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,73 +1,92 @@ | ||
| name: Publish REST API Docs | ||
| on: [push, pull_request] | ||
| name: Publish REST API Docs | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| make-restapi-docs: | ||
| name: Checkout phpList rest-api and generate docs specification (OpenAPI latest-restapi.json) | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Setup PHP, with composer and extensions | ||
| uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup PHP with Composer and Extensions | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: 7.4 | ||
| php-version: 8.1 | ||
| extensions: mbstring, dom, fileinfo, mysql | ||
| - name: Get composer cache directory | ||
| id: composer-cache | ||
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
| - name: Cache composer dependencies | ||
| uses: actions/cache@v2 | ||
|
|
||
| - name: Cache Composer Dependencies | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ steps.composer-cache.outputs.dir }} | ||
| # Use composer.json for key, if composer.lock is not committed. | ||
| # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
| path: ~/.composer/cache | ||
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
| restore-keys: ${{ runner.os }}-composer- | ||
| - name: Install current dependencies from composer.lock | ||
| run: composer install | ||
| - name: Generate OpenAPI Specification JSON for REST API | ||
| restore-keys: | | ||
| ${{ runner.os }}-composer- | ||
|
|
||
| - name: Install Composer Dependencies | ||
| run: composer install --no-interaction --prefer-dist | ||
|
|
||
| - name: Generate OpenAPI Specification JSON | ||
| run: vendor/bin/openapi -o docs/latest-restapi.json --format json src | ||
| - name: Upload REST API(latest-restapi.json) Spec | ||
| uses: actions/upload-artifact@v2 | ||
|
|
||
| - name: Upload REST API Specification | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: restapi-json | ||
| path: docs/latest-restapi.json | ||
|
|
||
| deploy-docs: | ||
| name: Deploy REST API specification. | ||
| name: Deploy REST API Specification | ||
| runs-on: ubuntu-20.04 | ||
| needs: make-restapi-docs | ||
| steps: | ||
| - name: Install node | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: '14' | ||
| - name: Install openapi-checker | ||
| run: npm install -g openapi-checker | ||
| - name: Checkout phplist/restapi-docs | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: phpList/restapi-docs | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.PUSH_REST_API_DOCS }} | ||
| - name: Restore REST API Spec | ||
| uses: actions/download-artifact@v2 | ||
| with: | ||
| name: restapi-json | ||
| - name: Validate latest-restapi.json | ||
| run: openapi-checker latest-restapi.json | ||
| - name: Get difference between latest-restapi.json and restapi.json | ||
| # `|| true` to supress exit code 1 [git diff exits with 1 when there is a difference between the two files and 0 for the reverse. | ||
| run: git diff --no-index --output=restapi-diff.txt latest-restapi.json restapi.json || true | ||
| - name: Verify difference latest-restapi.json and restapi.json | ||
| id: allow-deploy | ||
| run: | | ||
| if [ -s restapi-diff.txt ]; then echo "Updates made to restapi.json deployment proceeding."; echo '::set-output name=DEPLOY::true'; else echo "No updates made to restapi.json deployment would be skipped."; echo '::set-output name=DEPLOY::false'; fi | ||
| - name: Commit and changes and deply | ||
| if: ${{ steps.allow-deploy.outputs.DEPLOY == 'true' }} | ||
| run: | | ||
| mv latest-restapi.json restapi.json | ||
| git config user.name "github-actions" | ||
| git config user.email "github-actions@restapi-docs.workflow" | ||
| git add restapi.json | ||
| git commit -s -m "phplist/rest-api docs deployment `date`" | ||
| git push | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 14 | ||
|
|
||
| - name: Install openapi-checker | ||
| run: npm install -g openapi-checker | ||
|
|
||
| - name: Checkout REST API Docs Repository | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| repository: phpList/restapi-docs | ||
| fetch-depth: 0 | ||
| token: ${{ secrets.PUSH_REST_API_DOCS }} | ||
|
|
||
| - name: Download Generated REST API Specification | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: restapi-json | ||
|
|
||
| - name: Validate OpenAPI Specification | ||
| run: openapi-checker docs/latest-restapi.json | ||
|
|
||
| - name: Compare Specifications | ||
| run: git diff --no-index --output=restapi-diff.txt docs/latest-restapi.json restapi.json || true | ||
|
|
||
| - name: Check Differences and Decide Deployment | ||
| id: allow-deploy | ||
| run: | | ||
| if [ -s restapi-diff.txt ]; then | ||
| echo "Updates detected in the REST API specification. Proceeding with deployment."; | ||
| echo 'DEPLOY=true' >> $GITHUB_ENV; | ||
| else | ||
| echo "No changes detected in the REST API specification. Skipping deployment."; | ||
| echo 'DEPLOY=false' >> $GITHUB_ENV; | ||
| fi | ||
|
|
||
| - name: Commit and Deploy Updates | ||
| if: env.DEPLOY == 'true' | ||
| run: | | ||
| mv docs/latest-restapi.json docs/restapi.json | ||
| git config user.name "github-actions" | ||
| git config user.email "github-actions@restapi-docs.workflow" | ||
| git add docs/restapi.json | ||
| git commit -m "Update REST API documentation `date`" | ||
| git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,3 +14,4 @@ | |
| /public/ | ||
| /var/ | ||
| /vendor/ | ||
| .phpunit.result.cache | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,37 @@ | ||
| services: | ||
| Psr\Container\ContainerInterface: | ||
| alias: 'service_container' | ||
|
|
||
| PhpList\RestBundle\Controller\: | ||
| resource: '../src/Controller' | ||
| public: true | ||
| autowire: true | ||
| tags: ['controller.service_arguments'] | ||
|
|
||
| # Symfony\Component\Serializer\SerializerInterface: | ||
| # autowire: true | ||
| # autoconfigure: true | ||
|
|
||
| my.secure_handler: | ||
| class: \PhpList\RestBundle\ViewHandler\SecuredViewHandler | ||
| class: \PhpList\RestBundle\ViewHandler\SecuredViewHandler | ||
|
|
||
| my.secure_view_handler: | ||
| parent: fos_rest.view_handler.default | ||
| calls: | ||
| - ['registerHandler', [ 'json', ['@my.secure_handler', 'createResponse'] ] ] | ||
| parent: fos_rest.view_handler.default | ||
| calls: | ||
| - ['registerHandler', [ 'json', ['@my.secure_handler', 'createResponse'] ] ] | ||
|
|
||
| PhpList\Core\Security\Authentication: | ||
| autowire: true | ||
| autoconfigure: true | ||
|
|
||
| PhpList\Core\Domain\Repository\Messaging\SubscriberListRepository: | ||
| autowire: true | ||
| autoconfigure: true | ||
|
|
||
| PhpList\RestBundle\EventListener\ExceptionListener: | ||
| tags: | ||
| - { name: kernel.event_listener, event: kernel.exception } | ||
|
|
||
| PhpList\RestBundle\EventListener\ResponseListener: | ||
| tags: | ||
| - { name: kernel.event_listener, event: kernel.response } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.