FriendsOfSymfony1 / symfony1

[DEPRECATED -- Use Symfony instead] Fork of symfony 1.4 with DIC, form enhancements, latest Swiftmailer, better performance, composer compatible and PHP 8 support
https://symfony.com/legacy
MIT License
337 stars 175 forks source link

How to install the Propel plugin #332

Closed DBA-Z21A closed 4 months ago

DBA-Z21A commented 4 months ago

This text was created using automatic translation. Please forgive me if there are any grammatical errors.

I'm very happy that a project like this exists. A big thank you to everyone involved in the project.

I would like to have a system written in Symfony 1.1, currently running on centOS7, run on PHP 8.0.3. That system uses Propel for the ORM, so I created a new FriendsOfSymfony1 project as shown below and tried to install the Propel plugin, but it didn't work.

php vendor/friendsofsymfony1/symfony1/data/bin/symfony generate:project SymfonyTestProject --orm=none (New project generation completed successfully)

vendor/bin/symfony plugin:install sfPropelORMPlugin

plugin installing plugin "sfPropelORMPlugin" sfPearFrontendPlugin Attempting to discover channel "pear.symfony-project.com"... sfPearFrontendPlugin Attempting fallback to https instead of http on channel sfPearFrontendPlugin "pear.symfony-project.com"...

Unable to register channel "pear.symfony-project.com" (use --force-license to force installation)

vendor/bin/symfony plugin:install sfPropelORMPlugin --force-license

plugin installing plugin "sfPropelORMPlugin" sfPearFrontendPlugin Attempting to discover channel "pear.symfony-project.com"... sfPearFrontendPlugin Attempting fallback to https instead of http on channel sfPearFrontendPlugin "pear.symfony-project.com"...

Unable to register channel "pear.symfony-project.com"

What should I do to create a new project using Propel? Any advice would be greatly appreciated.

mkopinsky commented 4 months ago

You should not be creating new projects in symfony1. This project exists to provide support for existing applications which are still using symfony1, but new applications should be created in Symfony7 with Doctrine ORM 2 or 3.

connorhu commented 4 months ago

You should not be creating new projects in symfony1. This project exists to provide support for existing applications which are still using symfony1, but new applications should be created in Symfony7 with Doctrine ORM 2 or 3.

I think it's a translation error. He wants to make an existing system work. But correct me if I'm wrong.

connorhu commented 4 months ago

@DBA-Z21A If you have an existing system, I think it's easier to update it than to build a completely new skeleton. These legacy repo's are less testing for code generation, as everyone is upgrading their existing system, so there may be blind spots in the functionality.

mkopinsky commented 4 months ago

OK I see, he's trying to port the sf1.1+propel project to use fos1 (i.e. sf1.6), and doing so by trying to create a new project, installing propel, and then copying over the code. I agree with your second comment - he should be updating sf1 in the original project from 1.1 to 1.6 rather than trying to create a new project. I don't know how propel is typically installed, but the symfony pear channels have been down for years, so installing from pear isn't going to work.

DBA-Z21A commented 4 months ago

Thank you @connorhu, @mkopinsky. You are right. I want to create an empty FriendsOfSymfony1+Propel project and copy the symfony1.1+Propel code to it. Of course, I don't think that a simple copy will work perfectly! I understand that various modifications are necessary. But right now I don't know any other way to upgrade from symfony1.1 to FriendsOfSymfony1.

the symfony pear channels have been down for years, so installing from pear isn't going to work.

Thank you for your valuable information. If anyone knows how to install the Propel plugin, please advise.

connorhu commented 4 months ago

@DBA-Z21A There are update instructions in the wiki. It's pretty basic, but it contains important informations. To install propel, you first need to find a proper fork and install it with composer (you will have problems with propel in the future, so be prepared: https://github.com/FriendsOfSymfony1/symfony1/issues/288#issuecomment-1902757086 ). You can install it from the official repo: composer require propel/sf-propel-o-r-m-plugin "dev-master"

If this is done and you have done the parts of the wiki description that are relevant to you, you should be ahead.

DBA-Z21A commented 4 months ago

thank you! I was able to confirm that the files were extracted in the "plugins/sfPropelORMPlugin" directory.

Model creation commands such as "symfony propel:build-model" do not work yet, but I will research how to use them a little more. Is this the wiki URL? https://github.com/FriendsOfSymfony1/symfony1/wiki/Migrations I will read the description about Doctrine carefully and see if I can apply it to Propel.

Thank you for letting me know that there is a problem with Propel Plugin+PHP8. I will also consider using PHP7. My top priority is dealing with the end of support for centOS7.

Thank you very much for your appropriate and prompt assistance.

connorhu commented 4 months ago

@DBA-Z21A I will convert this issue to discussion. Feel free to ask if you stuck somewhere.