Kamalisk / arkhamdb

142 stars 84 forks source link

Multiple compile errors during initial local install #431

Closed cdburgess closed 3 years ago

cdburgess commented 3 years ago

I am trying to set up a local environment as defined in the read me because I would like to contribute. When I run composer install as suggested, I am told to run composer update which I do. However, there are multiple errors indicating some missing packages (there are also abandoned/deprecated packages) errors that won't allow me to proceed.

I am working on a Mac with PHP 7.4.

I don't want to just dive in and start changing things that might cause issues for you so I would like some guidance on how to move forward. When was the last time you installed from scratch? Does the README instructions still work for you?

Kamalisk commented 3 years ago

It has been a long time since I installed from scratch and I don't recognise the errors. I know there are definitely deprecated packages still being used, but I have never had chance to upgrade to a newer symfony and sort out issues.

cdburgess commented 3 years ago

Maybe I could help get this sorted out and get some testing in place? I will try to sort through the code and figure out what it going on. If you have any pointers that would be fabulous.

cdburgess commented 3 years ago

@Kamalisk WIll you run the following:

composer info

and paste the output here? It will allow me to see what versions of packages you are currently running. This may help me get past some of these errors. Thanks!

Kamalisk commented 3 years ago

Something like this:

behat/transliterator v1.3.0 String transliterator doctrine/annotations v1.8.0 Docblock Annotations Parser doctrine/cache 1.10.0 PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as re... doctrine/collections 1.6.4 PHP Doctrine Collections library that adds additional functionality on top of PHP arrays. doctrine/common 2.12.0 PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects... doctrine/dbal v2.10.1 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and mana... doctrine/doctrine-bundle 1.12.7 Symfony DoctrineBundle doctrine/doctrine-cache-bundle 1.4.0 Symfony Bundle for Doctrine Cache doctrine/doctrine-migrations-bundle 2.1.2 Symfony DoctrineMigrationsBundle doctrine/event-manager 1.1.0 The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine ... doctrine/inflector 1.3.1 Common String Manipulations with regard to casing and singular/plural rules. doctrine/instantiator 1.3.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer 1.2.0 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers. doctrine/migrations 2.2.1 PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBA... doctrine/orm v2.7.1 Object-Relational-Mapper for PHP doctrine/persistence 1.3.6 The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine... doctrine/reflection v1.1.0 The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds some ad... erusev/parsedown 1.7.4 Parser for Markdown. ezyang/htmlpurifier v4.12.0 Standards compliant HTML filter written in PHP fig/link-util 1.1.0 Common utility implementations for HTTP links friendsofsymfony/jsrouting-bundle 2.5.3 A pretty nice way to expose your Symfony2 routing to client applications. friendsofsymfony/oauth-server-bundle 1.6.2 Symfony2 OAuth Server Bundle friendsofsymfony/oauth2-php 1.2.3 OAuth2 library friendsofsymfony/user-bundle v2.1.2 Symfony FOSUserBundle gedmo/doctrine-extensions v2.4.39 Doctrine2 behavioral extensions incenteev/composer-parameter-handler v2.1.3 Composer script handling your ignored parameter file jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library jms/i18n-routing-bundle 2.0.4 This bundle allows you to create i18n routes. Fork of the jms/i18n-routing-bundle kriswallsmith/assetic v1.4.0 Asset Management for PHP leafo/scssphp v0.8.4 scssphp is a compiler for SCSS written in PHP. michelf/php-markdown 1.9.0 PHP Markdown monolog/monolog 1.25.3 Sends your logs to files, sockets, inboxes, databases and various web services nelmio/api-doc-bundle 2.13.4 Generates documentation for your REST API from annotations ocramius/package-versions 1.4.2 Composer plugin that provides efficient querying for installed package versions (no runtime IO) ocramius/proxy-manager 2.2.3 A library providing utilities to generate, instantiate and generally operate with Object Proxies paragonie/random_compat v2.0.18 PHP 5.x polyfill for random_bytes() and randomint() from PHP 7 patchwork/jsqueeze v2.0.5 Efficient JavaScript minification in PHP psr/cache 1.0.1 Common interface for caching libraries psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11) psr/link 1.0.0 Common interfaces for HTTP links psr/log 1.1.2 Common interface for logging libraries psr/simple-cache 1.0.1 Common interfaces for simple caching sensio/distribution-bundle v5.0.25 Base bundle for Symfony Distributions sensio/framework-extra-bundle v5.4.1 This bundle provides a way to configure your controllers with annotations sensio/generator-bundle v3.1.7 This bundle generates code for you sensiolabs/security-checker v6.0.3 A security checker for your composer.lock stof/doctrine-extensions-bundle v1.3.0 Integration of the gedmo/doctrine-extensions with Symfony2 swiftmailer/swiftmailer v5.4.12 Swiftmailer, free feature-rich PHP mailer symfony/assetic-bundle v2.8.2 Integrates Assetic into Symfony2 symfony/http-client v5.0.4 Symfony HttpClient component symfony/http-client-contracts v2.0.1 Generic abstractions related to HTTP clients symfony/mime v5.0.4 A library to manipulate MIME messages symfony/monolog-bundle v3.5.0 Symfony MonologBundle symfony/polyfill-apcu v1.14.0 Symfony polyfill backporting apcu* functions to lower PHP versions symfony/polyfill-ctype v1.14.0 Symfony polyfill for ctype functions symfony/polyfill-intl-icu v1.14.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-intl-idn v1.14.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-mbstring v1.14.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php56 v1.14.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions symfony/polyfill-php70 v1.14.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions symfony/polyfill-php73 v1.14.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions symfony/polyfill-util v1.14.0 Symfony utilities for portability of PHP codes symfony/service-contracts v2.0.1 Generic abstractions related to writing services symfony/swiftmailer-bundle v2.6.7 Symfony SwiftmailerBundle symfony/symfony v3.4.37 The Symfony PHP framework twig/extensions v1.5.4 Common additional features for Twig that do not directly belong in core twig/twig v2.12.5 Twig, the flexible, fast, and secure template language for PHP willdurand/jsonp-callback-validator v1.1.0 JSONP callback validator. zendframework/zend-code 3.4.1 Extensions to the PHP Reflection API, static code scanning, and code generation zendframework/zend-eventmanager 3.2.1 Trigger and listen to events within a PHP application

cdburgess commented 3 years ago

Thanks!

cdburgess commented 3 years ago

For those who may be following along, I updated my composer file to use all of the versions as specified above:

{ "name": "kamalisk/arkhamdb", "description": "An Arkham Horror LCG deckbuilder", "license": "proprietary", "type": "project", "autoload": { "psr-4": { "": "src/", "SymfonyStandard\\": "app/" } }, "require": { "php": ">=5.3.3", "symfony/symfony": "3.4.37", "symfony/assetic-bundle": "2.8.2", "symfony/swiftmailer-bundle": "2.6.7", "symfony/monolog-bundle": "3.5.0", "sensio/distribution-bundle": "5.0.25", "sensio/framework-extra-bundle": "5.4.1", "incenteev/composer-parameter-handler": "2.1.3", "friendsofsymfony/user-bundle": "2.1.2", "doctrine/dbal": "2.10.1", "doctrine/orm": "2.7.1", "doctrine/doctrine-bundle": "1.12.7", "friendsofsymfony/jsrouting-bundle": "2.5.3", "doctrine/doctrine-migrations-bundle": "2.1.2", "twig/extensions": "1.5.4", "ezyang/htmlpurifier": "4.12.0", "leafo/scssphp": "0.8.4", "patchwork/jsqueeze": "2.0.5", "friendsofsymfony/oauth-server-bundle": "1.6.2", "nelmio/api-doc-bundle": "2.13.4", "erusev/parsedown": "1.7.4", "stof/doctrine-extensions-bundle": "1.3.0", "jms/i18n-routing-bundle": "2.0.4" }, "require-dev": { "sensio/generator-bundle": "3.1.7" }, "scripts": { "post-root-package-install": [ "SymfonyStandard\\Composer::hookRootPackageInstall" ], "post-install-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "php bin/console assetic:dump", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ], "post-update-cmd": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "php bin/console assetic:dump", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" ] }, "config": { "bin-dir": "bin" }, "extra": { "symfony-app-dir": "app", "symfony-web-dir": "web", "symfony-var-dir": "var", "symfony-bin-dir": "bin", "symfony-assets-install": "relative", "incenteev-parameters": { "file": "app/config/parameters.yml" } } }

I ran composer and I still get the LazyLoadingValueHolderGenerator.php line 25 error:

Compile Error: Could not check compatibility between Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\LazyLoadingValueHolderGenerator::generate(ReflectionClass $originalClass, Zend\Code\Generator\ClassGenerator $classGenerator) and ProxyManager\ProxyGenerator\LazyLoadingValueHolderGenerator::generate (ReflectionClass $originalClass, Laminas\Code\Generator\ClassGenerator $classGenerator), because class Zend\Code\Generator\ClassGenerator is not available

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

I am still looking into the matter.

cdburgess commented 3 years ago

@Kamalisk do you still frequently run composer? For example, are you still able to run composer update and have no errors?

cdburgess commented 3 years ago

I was finally able to get composer to work. I had to manually add all of the versions as listed by @Kamalisk and downgrade composer to v1.10 . composer update also works, but that is to be expected since there are no additional updated versions in the .json file.

cdburgess commented 3 years ago

Success! I had to update/make the following changes:

I had to make the following changes to AppKernel.php:

Update line 41 to: if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {

Add the following to line 47:

if ('dev' === $this->getEnvironment()) { $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle(); }

Once I did those things, everything appears to be working locally.

Kamalisk commented 3 years ago

I am pretty sure a lot of the stuff it uses is old, I moved symfony version, but I need to do it again, just don't have time to do it and break everything :P Am fairly sure I am using a pre-built version of composer so that probably hasnt been updated in a while. Maybe I will make it a xmas project to clean stuff up. Good job on getting it working.

cdburgess commented 3 years ago

I'm noticing that the majority of the operational code for the website is contained in the JS files. But I was glad to see how this all works. I will watch for the updated version. Thanks!

MakJanko commented 1 year ago

@cdburgess This thread has been a god send, I really appreciate the list you made detailing the steps you took to get the server to run.

cdburgess commented 1 year ago

That's great that you were successful. Happy coding!