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

update dependencies #19

Merged
merged 1 commit into from
Jun 18, 2024
Merged

update dependencies #19

merged 1 commit into from
Jun 18, 2024

Conversation

garak
Copy link
Contributor

@garak garak commented Jun 13, 2024

Fix #18

Copy link
Member

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Since we're refreshing the bundle, I would also add PHPStan and our code style (in separate PRs): https://github.com/facile-it/facile-coding-standard/

composer.json Outdated
"symfony/framework-bundle": "^2.7 || ^3.0 || ^4.0",
"symfony/dependency-injection": "^2.7 || ^3.0 || ^4.0",
"symfony/config": "^2.7 || ^3.0 || ^4.0",
"php": "^7.4 || ^8.1",
Copy link
Member

Choose a reason for hiding this comment

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

Why is PHP 8.0 dropped? I know it's EOL, but if we're still supporting 7.4, it doesn't make sense to drop only that one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would see this with @ilario-pierbattista

Choose a reason for hiding this comment

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

I agree with @Jean85, we should support all php versions >= 7.4

Comment on lines 34 to 36
- name: Force Monolog
if: matrix.symfony == '^6.4'
run: composer require "monolog/monolog" --no-update
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this for 6.4 only?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's weird, but it fails otherwise. Look at the Actions, the last failing one. It doesn't find a monolog class, and I don't understand why. If you have a better solution, let me know.

Copy link
Member

Choose a reason for hiding this comment

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

Due to the force push, I cannot see it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to the force push, I cannot see it...

it's still visible here https://github.com/facile-it/crossbar-http-publisher-bundle/actions/runs/9495808250/job/26168834801

Copy link
Member

Choose a reason for hiding this comment

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

It seems that it's trying to load the Symfony Monolog Bridge's DebugProcessor, which is activated here: https://github.com/symfony/symfony/blob/7b5377056d151024d994757aba12db556aa2ee28/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L1180-L1188

As you can see, it can be shut off by disabling debug mode, which should also be the correct way to proceed in a test; try debug: false in the app that you're spinning up during the tests and that should be fixed. It's strange that it gets activated though, since I see a class_exists check too...

Choose a reason for hiding this comment

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

That's ugly. Probably this is caused by the committed composer.lock. We should try to remove it in CI before other dependencies are installed.

Btw I think it's useless to even have a committed composer.lock in a library project that aims to provide such a wide compatibility. What about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought the same at first, but then I realized that in the Actions we perform a composer update. So it's not a lock-related problem.
Anyway, I agree that keeping the lock doesn't make much sense.

Copy link
Member

Choose a reason for hiding this comment

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

If you have a composer.lock, composer update can still have a different behavior; I agree with @ilario-pierbattista, we should aim to remove it.

Comment on lines +16 to +25
public function createPublisher(
string $protocol,
string $host,
int $port,
string $path,
?string $key,
?string $secret,
$hostname,
bool $ignoreSsl = false
): Publisher {
Copy link
Member

Choose a reason for hiding this comment

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

This (and further edits) should normally be considered breaking changes. Are we considering to release this as a new major?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This (and further edits) should normally be considered breaking changes. Are we considering to release this as a new major?

I proposed this as a BC. I kept the 7.4 compatibility only to allow applying this upgrade before upgrading our project to PHP 8.

Choose a reason for hiding this comment

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

@Jean85 yes, I'd propose to release those BCs with a new major.

composer.json Outdated
"symfony/framework-bundle": "^2.7 || ^3.0 || ^4.0",
"symfony/dependency-injection": "^2.7 || ^3.0 || ^4.0",
"symfony/config": "^2.7 || ^3.0 || ^4.0",
"php": "^7.4 || ^8.1",

Choose a reason for hiding this comment

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

I agree with @Jean85, we should support all php versions >= 7.4

Comment on lines +16 to +25
public function createPublisher(
string $protocol,
string $host,
int $port,
string $path,
?string $key,
?string $secret,
$hostname,
bool $ignoreSsl = false
): Publisher {

Choose a reason for hiding this comment

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

@Jean85 yes, I'd propose to release those BCs with a new major.

Comment on lines 34 to 36
- name: Force Monolog
if: matrix.symfony == '^6.4'
run: composer require "monolog/monolog" --no-update

Choose a reason for hiding this comment

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

That's ugly. Probably this is caused by the committed composer.lock. We should try to remove it in CI before other dependencies are installed.

Btw I think it's useless to even have a committed composer.lock in a library project that aims to provide such a wide compatibility. What about it?

@ilario-pierbattista
Copy link
Member

Overall LGTM. Since we're refreshing the bundle, I would also add PHPStan and our code style (in separate PRs): https://github.com/facile-it/facile-coding-standard/

agree, opened #20 and #21 for them

@garak
Copy link
Contributor Author

garak commented Jun 17, 2024

Updates I did today: re-add php 8.0 compatibility, remove lock file, change test kernel to non-debug, remove monolog test hack.
I guess the PR should be ready now.

@ilario-pierbattista ilario-pierbattista merged commit 16b5677 into facile-it:master Jun 18, 2024
5 checks passed
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.

Support Symfony 5+
3 participants