Skip to content

Conversation

@kukulich
Copy link
Collaborator

No description provided.

@kukulich kukulich force-pushed the ci branch 8 times, most recently from 6536578 to 8b8a643 Compare January 28, 2024 18:20
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

PHP Fatal error: Uncaught OutOfBoundsException: Package "vimeo/psalm" is not installed in /home/runner/work/BetterReflection/BetterReflection/vendor/composer/InstalledVersions.php:182

Welp, I may be able to patch around this in upstream 😬

@@ -0,0 +1,30 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

Does renovate need adjustments here too? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was hoping it will work automatically 🤞

@Ocramius
Copy link
Member

@Ocramius
Copy link
Member

Release of other tool going up right now 👍

@kukulich kukulich changed the base branch from 6.25.x to 6.26.x March 10, 2024 12:10
@kukulich kukulich marked this pull request as ready for review March 10, 2024 12:24
@kukulich kukulich merged commit 8d1a2ad into Roave:6.26.x Mar 10, 2024
@kukulich kukulich deleted the ci branch March 10, 2024 12:24
Copy link
Member

@Ocramius Ocramius 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 tune this back a notch: we can move tools that don't share address space, but not tools that do share it 🤔

Let's see how this goes first, but caution is advised.

Happy to include sources as a "dependcency" from the tools directory though: that approach is smart too 👍

"phpstan/phpstan-phpunit": "^1.3.16",
"phpunit/phpunit": "^10.5.12",
"vimeo/psalm": "5.23.0",
"roave/infection-static-analysis-plugin": "^1.34.0"
Copy link
Member

Choose a reason for hiding this comment

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

This tool shares the same address space as the main library: moving it here may be a mistake (same for phpunit).

I think we should only move tools that operate completely independently, which currently includes phpcs, phpstan (not psalm, due to the coupling with the test suite mutations).

That said, I'm fine with trying this out anyway 👍

"Roave\\BetterReflection\\": "src"
}
},
"autoload-dev": {
Copy link
Member

Choose a reason for hiding this comment

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

This will also mess with editors 🤔

I'm not convinced of moving everything, but I'm open to trying it, for now 🤔

@Ocramius Ocramius added this to the 6.26.0 milestone Mar 10, 2024
"php": "8.1.99"
}
},
"autoload": {
Copy link
Member

Choose a reason for hiding this comment

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

Thinking of this further, we should probably add the parent package as a dependency, not as an autoload definition: that makes the parent package able to declare its own dependencies, and the tooling follows only

@kukulich
Copy link
Collaborator Author

I’m sorry - there was “approved” so I merged it.

@Ocramius
Copy link
Member

That's fine: it doesn't currently affect downstream, and we can always go back: I just thought this was splitting out a couple tools, but I misread from my phone, so I was too quick 😬

Let's see how this works out meanwhile 👍

@kukulich
Copy link
Collaborator Author

Just another idea - would it be possible to prepare phar for https://github.com/Roave/infection-static-analysis-plugin ? Dependencies will be packed in the Phar

@Ocramius
Copy link
Member

IMO no:

  1. Maintaining phar is a massive pain in the royal butt
  2. I prefer people to rely on an explicit composer.lock that they maintain, like we do here

Also, the tool sharing memory space with the program is a problem, when used from a phar: that's why I still firmly believe that using tools like phpunit from a phar is a mistake.

@Ocramius
Copy link
Member

BTW, it would be fine if address space wasn't shared (most static analysis tools), but not for this

@kukulich
Copy link
Collaborator Author

Hmm, it looks the PR was not successful.

We are still not able to upgrade PhpParser: #1387

PhpParser is used in tests so if we upgrade it we will have problem with Psalm and Infection dependencies again :(

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants