Conversation
| * @return void | ||
| */ | ||
| public function load(array $configs, ContainerBuilder $container) | ||
| public function load(array $configs, ContainerBuilder $container): void |
There was a problem hiding this comment.
the class is already marked as @internal and sowe can add the required return type without breaking any bc promises.
|
Note that to support Symfony 8 fully, you will also need to add support for Symfony 8 in the extensions themselves (they use |
|
Isn't it necessary to add an actual return type in the compiler passes as well ? |
Make sense.
Good hint, I added minimal test cases to catch it in future upgrades, are you fine with them? |
a408bdf to
e24cfbb
Compare
e24cfbb to
4dc773a
Compare
|
@alexander-schranz please rebase your branch to fix conflicts in the composer.json. I tried doing it but GitHub rejected my push to your branch (despite the UI saying that this PR allows edits by maintainers). |
4dc773a to
e6cd2a2
Compare
|
Rebased. PHPStan issues are related to symfony/symfony#62616 lets wait for response there. |
|
What about ignoring these PHPStan issues? 🫣 Let’s say we add rules to ignore these issues in this repo, would these errors also appear in projects that rely on this bundle? I really like PHPStan but I think that publishing a release – to allow end-users to upgrade their dependencies – is more important than static analysis. This is true only if ignoring this error would not create a cascade of errors in projects that use this bundle. |
c756a6f to
1bfe1ab
Compare
|
@stof symfony/symfony#62616 is merged. The CI would be get green as soon as that is released. Can currently be tested with |
I can't find a way to require your branch "patch-1" in my SF8 inpiste of the minimum stability and the composer repository declaration.
Is there anything special i'm missing to avoid to be stuck waiting the release ? |
|
There is a Dev run https://github.com/stof/StofDoctrineExtensionsBundle/actions/runs/19956359483/job/57226196540?pr=516 The phpstan would be green too if we add this. But i think it not needed, as symfony 8.0.1 will probably not take long to be released. |
|
Thank you @Chris53897 , i understand that's not already available in production, that's why i'm trying to use the "dev-patch-1" composer requirement but it can't find it. |
|
@doudoustephane the |
Even if i specified the repository entry point ? |
|
also composer does not resolve dependencies against a fork branch. It resolve against default branch and does then checkout the given branch, so no symfony 8 there. So be patient currently you need wait until things are merged. |
|
Okay, that explains things so, thank you to all for your answers |
this is not true. Branches are loaded as versions properly in composer (otherwise, we would not be able to have different dependencies in different versions of Symfony which would be insane). |
|
@doudoustephane What you need to do to get this branch to work locally is the following: KEEP IN MIND, THIS IS A TEMPORARY HACKIn your composer.json, add the following to the repositories section: "repositories": [
{
"type": "package",
"package": {
"name": "stof/doctrine-extensions-bundle",
"version": "dev-symfony8",
"source": {
"type": "git",
"url": "https://github.com/alexander-schranz/StofDoctrineExtensionsBundle.git",
"reference": "patch-1"
},
"autoload": {
"psr-4": {
"Stof\\DoctrineExtensionsBundle\\": "src/"
}
}
}
}
],Then, to use the package: composer require stof/doctrine-extensions-bundle:dev-symfony8 gedmo/doctrine-extensionsIf you don't have symfony flex, add the bundle just like the docs say. Then in your doctrine.yml: doctrine:
orm:
mappings:
gedmo_translatable:
type: attribute
prefix: Gedmo\Translatable\Entity
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/lib/Gedmo/Translatable/Entity"
alias: GedmoTranslatable # (optional) it will default to the name set for the mapping
is_bundle: false
gedmo_translator:
type: attribute
prefix: Gedmo\Translator\Entity
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/lib/Gedmo/Translator/Entity"
alias: GedmoTranslator # (optional) it will default to the name set for the mapping
is_bundle: false
gedmo_loggable:
type: attribute
prefix: Gedmo\Loggable\Entity
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
alias: GedmoLoggable # (optional) it will default to the name set for the mapping
is_bundle: false
gedmo_tree:
type: attribute
prefix: Gedmo\Tree\Entity
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity"
alias: GedmoTree # (optional) it will default to the name set for the mapping
is_bundle: falseThis is how far I have gotten, now to configure the rest... |
|
@NickMous using a |
|
@stof Somehow when I did that, it didn't work, I only got errors from composer |
I have the same problem, that's why i asked my first message too. |
|
Is there any additional help needed to get this one over the line? |
Not on my side, i came back the project to SF 7.4 and i'll see in a few weeks when SF8 will be stabilized |
1bfe1ab to
411bde8
Compare
|
CI green now 🟢 |
|
Still doctrine-extensions/DoctrineExtensions#3008 requires also a tag before. |
Prepare the Bundle for Symfony 8 release.