Skip to content

add psr/log 3, phpstan, drop unsupported PHP #30

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

Closed
wants to merge 2 commits into from
Closed

add psr/log 3, phpstan, drop unsupported PHP #30

wants to merge 2 commits into from

Conversation

tacman
Copy link

@tacman tacman commented Jan 24, 2025

This could be a starting point for a 2.0-dev branch.

Copy link
Member

@bocharsky-bw bocharsky-bw left a comment

Choose a reason for hiding this comment

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

I think we should also tweak PHP version in CI as well to match supported versions

composer.json Outdated
@@ -9,18 +9,19 @@
}
],
"require": {
"php": "^7.2 || ^8.0",
"php": "^8.3",
Copy link
Member

Choose a reason for hiding this comment

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

Hm, IMO it might be too aggressive for this bundle, no? Also, PHP 8.1 & 8.2 still support security fixes. Even Sf 7.3 requires 8.2

Copy link
Author

Choose a reason for hiding this comment

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

well, maybe. But if this is going to be a completely new release, we could be this aggressive. But the important thing (to me) is to drop php 7.

Copy link
Member

Choose a reason for hiding this comment

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

If it's a well-grounded change - I'm fine with it. I mean, why exactly should we use 8.3 and makes problems for people who are still on 8.2? Do we use any new syntax from 8.3 that requires as for this move? Of not - I would prefer to keep 8.2 users covered still. But also, what about LTS Symfony 6.4? I suppose we do want to support that version as well, and that version requires >=8.1. Unless we have strong arguments why it should be 8.3 - I think we can make PHP constraints not that strict IMO

Copy link
Member

Choose a reason for hiding this comment

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

But ok, we can think about the exact PHP version constraint later before the release, probably it would be more obvious base on the actual changes

composer.json Outdated
},
"require-dev": {
"phpunit/phpunit": "^8.4",
"nyholm/nsa": "^1.1",
"php-http/curl-client": "^1.0 || ^2.0",
"php-http/message": "^1.8",
"nyholm/psr7": "^1.2"
"nyholm/psr7": "^1.2",
"phpstan/phpstan": "^2.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 do we add PHPStan as a direct dependency here?

Copy link
Author

Choose a reason for hiding this comment

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

I love phpstan, especially for checking php 8.4 compatibility. But of course we don't need it, I could just keep it in my branch.

Copy link
Member

Choose a reason for hiding this comment

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

IIRC you can install PHPStan globally locally and use it, right? I mean, it doesn't have to be a direct dependency? Correct me if I'm wrong but lately using SA tools as direct dependencies is not the best practice anymore?

@bocharsky-bw
Copy link
Member

I don't use this package lately, but I don't want to block you from pushing things forward here, so as I see we have a few options:

  1. Either we prepare a big PR with green tests that we will just merge into master and tag a new release
  2. Or we can probably create a dev branch where we can speed up some merging even with failed tests to unblock other work.

As I understand you're leaning toward going with the 2nd option? just to clarify things. I'm fine with both ways if it helps to push things forward better/easier

@tacman
Copy link
Author

tacman commented Feb 4, 2025

I've pushed the changes you've suggested.

Or we can probably create a dev branch where we can speed up some merging even with failed tests to unblock other work.

Yes, that's my preference, because we can break things while we're working! Like using symfony/contracts and dropping the guzzle dependencies (and making them optional).

@bocharsky-bw
Copy link
Member

bocharsky-bw commented Feb 5, 2025

I created a dev branch on this repo based on the latest master, I think you can rebase this PR to it instead.

I'm not sure we should support different branches e.g. 1.x & 2.x as Symfony do in their repos, so I hope a dedicated dev would be enough for now

@tacman tacman closed this by deleting the head repository Feb 5, 2025
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.

2 participants