-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add psalm to project #6288
add psalm to project #6288
Conversation
Yeah I never liked this either, sadly that's the only xml linter we could find.
I think the right way would be + /**
+ * @param array<array-key> $keys
+ */
public function reorder(array $keys)
{
if ($this->has('batch')) {
array_unshift($keys, 'batch');
I think that would be great, but I would remove the dot: https://twitter.com/greg0ire/status/1065906445718294528 I also love the directory structure we have here: https://github.com/doctrine/dbal/tree/3.0.x |
@ greg0ire + /**
+ * @param array-key $keys
+ */
public function reorder(array $keys)
{
if ($this->has('batch')) {
array_unshift($keys, 'batch'); I've tried to set diffrent values, but came to conclusion that I just don't understand how it works. if |
Sorry yeah, I fixed my message, and I realise now even that isn't enough. |
+1 for the foreach. It will allow to check that we don't try to reorder a non-existant key. |
I would like to not publish phpstan/psalm configs/baseline on packagist this can be achiveed with folder with dot notation. Do you know any other way how can I do this? |
Contribute something here: https://github.com/sonata-project/dev-kit/blob/master/templates/project/.gitattributes.twig ? We might want to add a |
Maybe that should be done on |
@greg0ire thank you for showing how to ignore it, I would like to add it to |
the test fails because of discussion in #6288 (comment) |
98f3cbc
to
4186e2d
Compare
Ok to me since it comes with comments, it still looks maintainable. |
I've removed |
I don't understand how I broke tests in Somewhy it was caused by |
3b9993c
to
ab613e3
Compare
I would love to avoid doing this if we don't directly use this library. The error you got is indeed because of The question would be, why does it install
Then
Seems like psalm had the same issue: vimeo/psalm#3967 I made a PR to fix this: felixfbecker/php-advanced-json-rpc#41 |
@VincentLanglet thanks a lot! Should I just wait? |
@greg0ire do you have access to the scrutinizer configuration? this could be a problem |
I have access to the config for the repository, but not the one for the global config which is shared with it. Anyway, not a huge deal since Scrutinizer is not required for merges. I'm not sure what the issue is by the way… maybe it's using an outdated version of PHP? |
To me it looks like an outdated version of composer. The thing is: if we merge this (which is a great pr btw) we wont have scrutinizer working anymore until someone with access to the global config makes some changes to it. Maybe @rande has access or can give access to someone else? |
By the way, I have emailed to |
is scrutinizer-ci.com still a thing ? we can remove that, I will log into it I check if there are any options to upgrade composer. |
As I can see, last blog post was in 2018. What benefits it provided? Asking so that we can substitute it with some other tool. |
Could you please rebase your PR and fix merge conflicts? |
32af50c
The only remaining question, is what do we do about scrutinizer... |
Is this an open topic for this PR? Maybe we should create a new issue (on dev-kit) to resolve this problem. |
Currently scrutinizer is working. Either we drop scrutinizer, either we fix the build here. |
I'm for deprecating the This is the list of the reasons for deprecating this service
|
Thank you @vladyslavstartsev |
@vladyslavstartsev Thanks! @jordisala1991 I'm not sure how to achieve that, so for now, I will just remove the Scrutinizer webhook from this bundle, and we'll see how things go. If it's enough I will do that for all repos, otherwise I suppose I will have to remove repositories from the Scrutinizer UI. |
Please add
pedantic
tag here.I think it's time to psalm, so that phpstan and psalm can work together on our code.
Since I can't edit
.gitattributes
I'm thinking of creating.psalm
folder OR even.static-analysis
folder which will containpsalm
andphpstan
folders. What do you think about it?Also there is 1 issue left, I don't know how to fix it the right way
What I can do, is just ignore it with baseline and fix it latter (in v4.x), but that's not solving the problem.
What I don't like is, that xml sniff forces me to write properties to
psalm.xml
in one rowvs
Changelog