Skip to content
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

Bump to PHP 8.3 and Symfony 7 #6

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:

strategy:
matrix:
php: ['8.1', '8.2']
php: ['8.3']

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: "memory_limit=-1"
php-version: "${{ matrix.php }}"
tools: "composer, composer-normalize"
tools: "composer"

- name: Display versions
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
=====

* (improvement) Trim URLs before parsing.
* (improvement) Require Symfony 7 and PHP 8.3+.


1.0.2
Expand Down
36 changes: 17 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
}
],
"require": {
"php": ">= 8.1",
"21torr/bundle-helpers": "^2.1.2",
"symfony/console": "^6.1",
"symfony/http-kernel": "^6.3",
"symfony/string": "^6.2",
"symfony/validator": "^6.1"
"php": ">= 8.3",
"21torr/bundle-helpers": "^2.2",
"symfony/console": "^7.0",
"symfony/http-kernel": "^7.0",
"symfony/string": "^7.0",
"symfony/validator": "^7.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^10.2",
"roave/security-advisories": "dev-latest"
"roave/security-advisories": "dev-latest",
"symfony/phpunit-bridge": "^7.0"
},
"autoload": {
"psr-4": {
Expand All @@ -39,28 +39,26 @@
"sort-packages": true
},
"extra": {
"bamarni-bin": {
"bin-links": false,
"forward-command": true
},
"branch-alias": {
"dev-next": "2.x-dev"
}
},
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi"
],
"post-update-cmd": [
"@composer bin all update --ansi"
],
"fix-lint": [
"php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi",
"@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --ansi"
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi",
"@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --ansi"
],
"lint": [
"@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --dry-run --ansi",
"php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --dry-run --no-interaction --ansi"
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --dry-run --no-interaction --ansi"
],
"test": [
"phpunit",
"phpstan analyze -c phpstan.neon . --ansi"
"simple-phpunit",
"vendor-bin/test/vendor/bin/phpstan analyze -c phpstan.neon . --ansi"
]
}
}
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
Expand All @@ -13,7 +12,7 @@
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="10.2" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.6" />
</php>

<testsuites>
Expand Down
4 changes: 1 addition & 3 deletions tests/Video/VideoUrlParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Video;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Torr\EmbedHelpers\Video\Parser\VimeoUrlParser;
use Torr\EmbedHelpers\Video\Parser\YouTubeUrlParser;
Expand Down Expand Up @@ -56,9 +55,8 @@ public static function provideTestCases () : iterable
}

/**
*
* @dataProvider provideTestCases
*/
#[DataProvider("provideTestCases")]
public function testParsing (
string $url,
?VideoPlatform $expectedPlatform,
Expand Down