Skip to content
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

Ramsey\Uuid\Uuid #106

Closed
katalysis opened this issue Feb 19, 2024 · 11 comments
Closed

Ramsey\Uuid\Uuid #106

katalysis opened this issue Feb 19, 2024 · 11 comments

Comments

@katalysis
Copy link

I have everything working well on 9.2.6 except for downloading a file which generates and error:

Exception Occurred: /var/www/vhosts/dev43.katalysis.net/httpdocs/packages/brand_central/controllers/single_page/collections/download.php:250 Class "Ramsey\Uuid\Uuid" not found (0)

Ramsey is missing from the initial install. I tried requiring it with composer which seems to work in principle but I still get the error

@aembler
Copy link
Member

aembler commented Feb 19, 2024

Could you let me know how you're installing the package? Did you check it out from git, copy it into the packages/ folder and install it (traditional Concrete install) or did you install this package via composer (something like composer require concrete5/brand_central in a project directory.)

@katalysis
Copy link
Author

I've downloaded the repository and then tried to build using composer. The composer file in the repository root doesn't work for me (see below) so I hacked about the older example found here:

https://github.com/concretecms/brand_central/blob/master/INSTALL.md

This results in a more or less working install but with the download functions broken and no Ramsey\Uuid etc.

If I use the composer file from the root I get these issues:

Problem 1 - Root composer.json requires pestphp/pest 2.x-dev -> satisfiable by pestphp/pest[2.x-dev]. - Conclusion: don't install concrete5/core 9.3.x-dev (conflict analysis result) - pestphp/pest-plugin-arch[v2.7.0, ..., 2.x-dev] require ta-tikoma/phpunit-architecture-test ^0.8.4 -> satisfiable by ta-tikoma/phpunit-architecture-test[0.8.4]. - pestphp/pest 2.x-dev requires pestphp/pest-plugin-arch ^2.7.0 -> satisfiable by pestphp/pest-plugin-arch[v2.7.0, 2.x-dev]. - concrete5/core[9.2.0RC2, ..., 9.2.4] require illuminate/filesystem ^8 -> satisfiable by illuminate/filesystem[v8.0.0, ..., 8.x-dev]. - illuminate/filesystem[v8.18.1, ..., v8.73.2] require symfony/finder ^5.1.4 -> satisfiable by symfony/finder[v5.1.4, ..., 5.4.x-dev]. - illuminate/filesystem[v8.0.0, ..., v8.18.0] require symfony/finder ^5.1 -> satisfiable by symfony/finder[v5.1.0-BETA1, ..., 5.4.x-dev]. - illuminate/filesystem[v8.74.0, ..., 8.x-dev] require symfony/finder ^5.4 -> satisfiable by symfony/finder[v5.4.0-BETA1, ..., 5.4.x-dev]. - You can only install one version of a package, so only one of these can be installed: symfony/finder[v2.2.0, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev, v6.0.0-BETA1, ..., 6.4.x-dev, v7.0.0-BETA1, ..., 7.1.x-dev]. - ta-tikoma/phpunit-architecture-test 0.8.4 requires symfony/finder ^6.4.0 || ^7.0.0 -> satisfiable by symfony/finder[v6.4.0-BETA1, ..., 6.4.x-dev, v7.0.0-BETA1, ..., 7.1.x-dev]. - Conclusion: don't install symfony/finder 7.1.x-dev (conflict analysis result) - Root composer.json requires concrete5/core ^9.2 -> satisfiable by concrete5/core[9.2.0RC2, ..., 9.3.x-dev].

@aembler
Copy link
Member

aembler commented Feb 20, 2024

Ah, I see what the problem is. We actually have a parent project, which installs Concrete, Brand Central, a couple of custom dependencies we use for the project itself, and the Drop Box add-on https://github.com/concretecms/drop_box.

It's this drop box add-on that actually installs the Ramsey\UUID package, which is why we weren't seeing this error. However, Brand Central should be installable in this standalone way, so I'm going to try and ship a fix for this.

First, if you check out this pull request - could you see if this update fixes your issue? It should ship the proper package in Brand Central to remediate the specific error.

#107

Next, you might consider also installing the Drop Box add-on linked above - it has some functionality that is useful within BrandCentral.

@katalysis
Copy link
Author

So have checked out pull request, run composer install (including adding mlocati/composer-patcher). This builds properly, however, if I replace the previously almost working brand_central package with this on my 9.2.6 install I get various errors:

First on the home page:

preg_match(): Compilation failed: invalid range in character class at offset 4

If I navigate to other pages e.g. /collections:

Whoops \ Exception \ ErrorException (E_COMPILE_ERROR)
Cannot declare class Concrete\Core\Entity\Board\Designer\CustomElement, because the name is already in use

screencapture-dev44-katalysis-net-index-php-2024-02-21-17_58_53
screencapture-dev44-katalysis-net-login-2024-02-21-18_09_17

@aembler
Copy link
Member

aembler commented Feb 21, 2024

Hmm, typically that error means that the patches were not actually installed.

@katalysis
Copy link
Author

It looks to me as if they did install but composer is not my strong suit...

"config": { "allow-plugins": { "pestphp/pest-plugin": true, "mlocati/composer-patcher": true } }

Not really sure where to go from here to get a working installation?

@KorvinSzanto
Copy link
Member

@katalysis I'm not sure about your declare error but you can fix the other one by requiring https://packagist.org/packages/concretecms/dependency-patches.

In reality this package isn't really well supported outside of a composer based installation.

@katalysis
Copy link
Author

Tried @aembler's fix above on top of a composer based install of Concrete CMS but then get a mime type error:

Exception Occurred: /var/www/vhosts/dev44.katalysis.net/httpdocs/concrete/vendor/symfony/http-foundation/File/File.php:78 You cannot guess the mime type as the Mime component is not installed. Try running "composer require symfony/mime". (0)

Adding symfony/mime then takes us back to the Ramsey/Uuid error:

Exception Occurred: /var/www/vhosts/dev44.katalysis.net/httpdocs/packages/brand_central/controllers/single_page/assets/download.php:287 Class "Ramsey\Uuid\Uuid" not found (0)

So I've then tried to use drop_box too as suggested by Andrew, after running the build routine for this and uploading to packages etc. I get a new error:

Call to undefined method Concrete\Core\Application\Application::share()

We probably need to draw a line under this now without a clear route to a fully working installation.

@aembler
Copy link
Member

aembler commented Feb 27, 2024

Let's try a different approach. I'm concerned that there are deeper systemic problems with installing BrandCentral in a non-composer based Concrete install. We've never personally used non-composer BrandCentral in production; I thought that some simple fixes to the package might get us where we need to go but I think there may be deeper problems.

With that in mind, can we try switching to an install that installs Concrete, BrandCentral and the Drop Box add-on via Composer instead of using standalone Concrete packages? It should be fairly simple. I've set up a new repository with a composer.json that should bring all the required dependencies. It has a pretty comprehensive README, which I've used to verify that this project can install locally.

https://github.com/concretecms/brand_central_client

Can you switch to using that with the instructions that are in the README file, and let me know if that makes installation work better for you @katalysis ?

@katalysis
Copy link
Author

@aembler thank you, that's working nicely.

@aembler
Copy link
Member

aembler commented Feb 28, 2024

Awesome, glad to hear it!

@aembler aembler closed this as completed Feb 28, 2024
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

No branches or pull requests

3 participants