Closed fritzmg closed 7 months ago
Shouldn't Composer return the version of a package that is provided by another package?
I mean that sounds like something that should be fixed in Composer instead? 🤔 /cc @Toflar
Why would Composer care about how you build your monorepos?
It's not about monorepo. It's about the fact that we check for a version of a package, but the package has been replaced by another one. So I would expect to get the version of the replacing package.
Or maybe there is a way to find the "final" package to check that version? 🤔
No idea 🤷♂️ I think the PR looks correct (will still not work with dev
branches but that's what it is).
(will still not work with dev branches but that's what it is)
The package name of a dev branch will still be contao/contao
.
There will be no version.
True. I think we can change the check altogether.
No idea 🤷♂️ I think the PR looks correct (will still not work with
dev
branches but that's what it is).
This PR works, because the author of this extension assumes to have either of those packages installed. But if contao/core-bundle
is replaced by foobar/core-bundle
fork, it will not longer work either.
@qzminski the check was added in https://github.com/codefog/contao-haste/commit/25b2f0ec3d7d3199ceb3c43c1a3193a33d4eebfb - but what is the reason behind it? Shouldn't this also apply in Contao 4.13?
The problem is with the file uploads. They have been reworked by @Toflar in Contao 5 and there is no longer $_SESSION['FILES']
, but now they are returned as the widget's value. In Contao core it changed here: https://github.com/contao/contao/blob/5.x/core-bundle/contao/forms/Form.php#L273
Yes but the method returns $widget->value
in any case:
$widget->submitInput()
should return true (unless the widget is disabled or readonly).
That's exactly the problem: https://github.com/contao/contao/blob/5.x/core-bundle/contao/forms/FormUpload.php
The upload field does not have the $blnSubmitInput = true
.
Right, but then we can still remove the version check, can we not? Because:
if ($widget instanceof UploadableWidgetInterface) {
return $widget->value;
}
null
in Contao 4.13, since the FormFileUpload
widget does not hold the value.Theoretically yes. I think that would be the appropriate fix. @Toflar what do you think?
If it works, it's the appropriate fix :D
I have just released it as 5.1.14, thank you @fritzmg !
When using the Contao mono repo the following error might occur:
This PR fixes that by allowing to fall back to the mono repo if
contao/core-bundle
is not found.