Skip to content

Upgrade dependencies for PHP8.2+ support and removing Security Advisories#272

Draft
homersimpsons wants to merge 1 commit intoCouscousPHP:masterfrom
homersimpsons:chore/upgrade-dependencies
Draft

Upgrade dependencies for PHP8.2+ support and removing Security Advisories#272
homersimpsons wants to merge 1 commit intoCouscousPHP:masterfrom
homersimpsons:chore/upgrade-dependencies

Conversation

@homersimpsons
Copy link

@homersimpsons homersimpsons commented Feb 15, 2026

Fixes #271

DRAFT: It mostly works, there are changes that can be seen as regressions

  • Update CI
  • phpunit/phpunit upgraded to 11
    • phpunit/phpunit 13 requires php >= 8.4.1
    • phpunit/phpunit 12 requires php >= 8.3
    • Upgraded annotations to attributes
    • Fix deprecated methods

Run psalm:

docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp php:8.3-cli vendor/bin/psalm

$filename = $this->replaceExtension($file->relativeFilename);

return new HtmlFile($filename, $document->getContent(), $file);
return new HtmlFile($filename, rtrim($document->getContent(), "\n"), $file);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the new CommonMarkParser append a trailing \n. This creates a lot of tests failure as:

Test

gets outputted as

<p>Test</p>
+

@@ -1,4 +1,4 @@
<h1 id="custom-id">Markdown Extra heading</h1>
<h1 id="markdown-extra-heading-custom-id">Markdown Extra heading {#custom-id}</h1>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


use PHPUnit\Framework\Attributes\CoversNothing;

#[CoversNothing]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the tests here invoke the bin/couscous command, so I believe that coverage won't get reported anyway.


public function testFootnotes()
{
$this->markTestSkipped('TODO');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we are missing an extension, I will try to dig into that, but any hint would help.


public function testAbbreviations()
{
$this->markTestSkipped('TODO');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we are missing an extension, I will try to dig into that, but any hint would help.

"twig/twig": "^3.0",
"erusev/parsedown": "^1.7.4",
"erusev/parsedown-extra": "^0.8.1",
"phine/phar": "^1.0",
Copy link
Author

@homersimpsons homersimpsons Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: replace phine/phar with box-project/box2

"mnapoli/front-yaml": "^1.5",
"php-di/php-di": "^6.0",
"psr/log": "^1.0",
"padraic/phar-updater": "^1.0"
Copy link
Author

@homersimpsons homersimpsons Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

padraic/phar-updater is abandoned (removed as it does not support latest php version), what should we do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be OK to just drop that 🤷

"vimeo/psalm": "^3.16"
"phpunit/phpunit": "^11.0",
"squizlabs/php_codesniffer": "^4.0",
"vimeo/psalm": "^6.0"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe psalm 7.0 will be released soon?

vimeo/psalm 6 requires php ~8.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

couscous/couscous has security advisories

2 participants