Skip to content

[task] generate:project command is broken #341

Open
@connorhu

Description

@connorhu

Although it is not recommended to create a new project based on symfony1, it may sometimes be necessary to build a symfony1 project from scratch.

For a completely empty project, the project:generate command does not work.

Error:

PHP Warning: require_once(/Doctrine/Core.php): Failed to open stream: No such file or directory in .../vendor/friendsofsymfony1/symfony1/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php on line 36

PHP Fatal error: Uncaught Error: Failed opening required '/Doctrine/Core.php' (include_path='.:/Users/connor/.phpbrew/php/php-8.3.0/lib/php/pear') in .../vendor/friendsofsymfony1/symfony1/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php:36

Code fragment causing the error:

if (!class_exists('Doctrine_Core')) {
require_once sfConfig::get('sf_doctrine_dir', realpath(dirname(__FILE__).'/../lib/vendor/doctrine/lib')).'/Doctrine/Core.php';
spl_autoload_register(['Doctrine_Core', 'autoload']);
}

Reproduction steps:

mkdir folder
cd folder
composer require friendsofsymfony1/symfony1
vendor/bin/symfony generate:project gentest

We should check if the doctrine plugin can be detached from the project and moved to a separate repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions