Giter VIP home page Giter VIP logo

friendsofsymfony1 / symfony1 Goto Github PK

View Code? Open in Web Editor NEW
336.0 53.0 176.0 5.22 MB

[DEPRECATED -- Use Symfony instead] Fork of symfony 1.4 with DIC, form enhancements, latest Swiftmailer, better performance, composer compatible and PHP 8 support

Home Page: https://symfony.com/legacy

License: MIT License

PHP 99.17% Shell 0.07% CSS 0.48% JavaScript 0.13% Batchfile 0.03% Hack 0.04% AMPL 0.03% Dockerfile 0.04%
symfony1 hacktoberfest

symfony1's Introduction

Build Status

About this version

This is a community driven fork of symfony 1, as official support has been interrupted in November 2012.

Do not use it for new projects: this version is great to improve existing symfony1 applications, but newer Symfony versions is the way to go today.

All the enhancements and BC breaks are listed in the WHATS_NEW file, this include:

  • DIC
  • Composer support
  • PHP 8.3 support
  • performance boost
  • new widgets & validators
  • some tickets fixed from the symfony trac
  • ...

About symfony

Symfony is a complete framework designed to optimize the development of web applications by way of several key features. For starters, it separates a web application's business rules, server logic, and presentation views. It contains numerous tools and classes aimed at shortening the development time of a complex web application. Additionally, it automates common tasks so that the developer can focus entirely on the specifics of an application. The end result of these advantages means there is no need to reinvent the wheel every time a new web application is built!

Symfony was written entirely in PHP 5. It has been thoroughly tested in various real-world projects, and is actually in use for high-demand e-business websites. It is compatible with most of the available databases engines, including MySQL, PostgreSQL, Oracle, and Microsoft SQL Server. It runs on nix and Windows platforms.

Requirements

PHP 5.3.4 and up. See prerequisites on https://symfony.com/legacy/doc/getting-started/1_4/en/02-Prerequisites

Installation

See https://symfony.com/legacy/doc/getting-started/1_4/en/03-Symfony-Installation

Option 1: Using Composer as dependency management:

composer require friendsofsymfony1/symfony1 "1.5.*"
composer install

Note: On windows, if your project is a few directories down from the drive root, composer can throw an error relating to ZipArchive::extractTo(), this can be because pathnames are too long. There currently appears to be no proper solution but a workaround is to move your project to the drive root, run the commands from there, where they will run happily, and then move your project back.

Option 2: Using Git submodules:

git init # your project
git submodule add https://github.com/FriendsOfSymfony1/symfony1.git lib/vendor/symfony
git submodule update --init --recursive

Tests

Prerequisites

  • docker-engine version 17.12.0+
  • docker-compose version 1.20.0+

How to execute all tests on all supported PHP versions and dependencies?

test/bin/test

For PHP 7.3 and for lowest dependencies versions?

test/bin/test php73 lowest

For PHP 7.3 and for highest dependencies versions?

test/bin/test php73 highest

For executing a dedicated test file?

test/bin/test php73 highest test/unit/cache/sfAPCCacheTest.php

When you finish your work day, do not forget to clean up your desk

docker-compose down

Documentation

Read the official symfony1 documentation

Contributing

You can send pull requests or create an issue.

symfony1's People

Contributors

antony-develop avatar callmebob2016 avatar cmdeviant avatar connorhu avatar damienalexandre avatar dator avatar garak avatar gromnan avatar iricketson avatar issei-m avatar j0k3r avatar jeromemacias avatar kalessil avatar laurentb avatar marekk avatar mentalstring avatar mkopinsky avatar mpoiriert avatar pathumhdes avatar thepanz avatar thirsch avatar timmipetit avatar tlt-miamed avatar tofuwarrior avatar tybaze avatar verfriemelt-dot-org avatar vitaliytv avatar w0rma avatar zkiiito avatar zobzn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

symfony1's Issues

Dynamic YAML file issue

Hello,

Just started to update a big Sf 1.4 app.
Stay blocked on an issue with a routing.yml containing PHP:

ranking_championship_scorers_fr:
  url:     /saison-:period_slug/:championship/equipe-:team/classement-buteurs-championnat.html
  class:   myRoute
  param:   { module: componentRanking, action: index, ranking_type: "<?php echo RankingForm::VIEW_SCORERS ?>", type: "<?php echo PlayerStatsPeer::TYPE_CHAMPIONSHIP ?>" }
  requirements:
    active_component: team

And the error:

Unable to parse file "/Volumes/Code/myapp/apps/frontend/config/routing.yml": Malformed inline YAML string ({ module: componentRanking, action: index, ranking_type: 1..109).

Any idea?

PHP 5.5 support

With PHP 5.5 I get a lot of Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

Doctrine error when Using submodules

Warning: require_once(/Doctrine/Core.php): failed to open stream: No such file or directory in /myproject/lib/vendor/symfony1/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php

This error message seems to be because express/symfony1 does not know where the new doctrine is.

Version number

Project itself is great and updated frequently but number version is set as 1.4.17-DEV

You abandon version number or just forget about it?

sfPropelPlugin

symfony propel:build-model doesn't work anymore.

Why you dropped propel plugin?
Can you please add it in the next version.

Install via Composer

When I tried to install library via composer

composer require lexpress/symfony1 dev-master

I got this:

composer.json has been updated
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for lexpress/symfony1 dev-master -> satisfiable by lexpress/symfony1 dev-master.
    - lexpress/symfony1 dev-master requires lexpress/doctrine1 * -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

LExpress/doctrine1 and Doctrine.php

Why is the file /lib/Doctrine.php left out.
It leaves out

class Doctrine extends Doctrine_Core
{
}

which breaks some code like Doctrine::getTable.

Adapts the Symfony2 DI Container

Why not use the Symfony2 DI Container as project DIC? I think that one is more powerful and flexible than sfServiceContainer.
In spite of there are also other useful DIC in PHP world (e.g. Pimple), introducing the new one by reinventing the wheel does not make sense.
Can you introduce Symfony's DIC as project DIC? I REALLY hope that you consider about this :)

Add tag version to lexpress/doctrine1

Can you please add tag versions to packagist of lexpress/doctrine1? The current version is dev-master.

Sorry to post this here, but issues are disabled in lexpress/doctrine1.

CSRF not refreshed

Hi everybody,

at first I want to thank everybody behind this project! Awesome work.

I have a question:

A user clicks on a form, enters his data and sends the form after the session has expired. Maybe he was on the phone, closed his laptop or whatever. When he comes back, he posts the form which results in a csrf validation error.
Now the csrf token will still be the old one on the form with the error. In Symfony2, the user will have the new token so he can post the form with the data already entered.

What's your opinion on this behaviour?

Cheers Michi

SaveEmbeddedForms replaced by saveObjectEmbeddedForms ???

Hi,

We have a project with Symfony 1.4 which worked. After replacing Symfony with this version, found that the subform functionality was not working as expected.

Turns out the original symfony form function SaveEmbeddedForms has been removed and saveObjectEmbeddedForms is being called instead.

Also noticed, the validators in subforms while being called, are not able to modify the values. We provided a "Remove" button in subform list, and in validator where checking for the remove flag, and removing that item from the values. This no longer works, despite removing the item, at the saveObjectEmbeddedForms, if we do a $form->getValues($subform_name), we get the originally submitted values, not the values modified by the validator.

cannot install with composer

i try to install and get an error:

root@xxx:/var/www/xxx/yyy/lib/vendor# composer.phar  require lexpress/symfony1 v1.5.*

  [UnexpectedValueException]                                                  
  Could not parse version constraint v1.5.*: Invalid version string "v1.5.*"  

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [packages1] ... [packagesN]

any ideas?

preg_replace() the /e modifier is deprecated

Just to inform:

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ----\lib\vendor\symfony\lib\util\sfToolkit.class.php on line 362

Replace:
return preg_replace(array_keys($replacePairs), array_values($replacePairs), $search);
With:
return strtr($search, $replacePairs);

sfAPCCache seems to not be compatible with apcu

APCu seems to not use the same way to store "key".
sfAPCCache->getCacheInfo():

  protected function getCacheInfo($key)
  {
    if (!$this->enabled)
    {
      return false;
    }

    $infos = apc_cache_info('user');

    if (is_array($infos['cache_list']))
    {
      foreach ($infos['cache_list'] as $info)
      {
        if ($this->getOption('prefix').$key == $info['info'])
        {
          return $info;
        }
      }
    }

    return null;
  }

Before this if if ($this->getOption('prefix').$key == $info['info']), I vardumped the $info array and here it is for APCu & APC.
With APCu:

array (size=9)
  'key' => string 'account:/localhost/all/main/index/__sf_cache_key/item_tags_8267' (length=63)
  'ttl' => int 86400
  'nhits' => float 0
  'mtime' => int 1394384708
  'ctime' => int 1394384708
  'dtime' => int 0
  'atime' => int 1394384708
  'ref_count' => int 0
  'mem_size' => int 1712

And this with APC:

array (size=9)
  'info' => string 'account:/localhost/all/main/index/__sf_cache_key/item_tags_8267' (length=63)
  'ttl' => int 86400
  'nhits' => float 0
  'mtime' => int 1394384708
  'ctime' => int 1394384708
  'dtime' => int 0
  'atime' => int 1394384708
  'ref_count' => int 0
  'mem_size' => int 1712

Spot the first key from the array ? info != key
Should we create a sfAPCuCache ? The problem will also appear in removePattern().

Can't use configureDoctrine function anymore

On sf1.4, the following code was inside sfDoctrinePluginConfiguration.class.php allowing me to use configureDoctrine() inside my ProjectConfiguration.class.php

 if (method_exists($this->configuration, 'configureDoctrine')) {
     $this->configuration->configureDoctrine($manager);
 }

I understand that now I should use the dispatcher on doctrine.configure event, but for retrocompatibility, it should be back or at least mentionned in migration doc.

Convert helpers to services

Hi !

Maybe you could convert base helpers to services ? It makes sense to have the ability to inject "helper.date"or "helper.text" in a service.

In DateHelper I see this code :

  if (sfConfig::get('sf_i18n'))
  {
    require_once dirname(__FILE__).'/I18NHelper.php';

    return __($string, $parameters);
  }

which could be replaced by a dependency injection

I imagine xxxHelper file to act like proxies to the real helper classes.

Doctrine_Core::HYDRATE_ON_DEMAND not working

I upgraded my project from Symfony 1.4.20, where following query was working just fine, unfortunately now HYDRATE_ON_DEMAND doesn't work anymore.

        $uctuj_od_dt = "2015-10-01 00:00:00";
        $q_ucty = Doctrine_Query::create()
                ->select()
                ->from('Ucet')
                ->where('od >= ?', $uctuj_od_dt)
        ;

        $ucty = $q_ucty->execute(array(), Doctrine_Core::HYDRATE_ON_DEMAND);
//        $ucty = $q_ucty->execute();

        $counter = 0;
        foreach ($ucty_tel as $ucet) {
            // doing something
            $counter++;
        }

If I use Doctrine_Core::HYDRATE_ON_DEMAND the $counter ends up to be only 2, instead of many hundreds, which are in database. If I use only $ucty = $q_ucty->execute(); then I get all the results as expected, but then it consumes to much memory on the server... I also noticed, that if I use query without the where clause, then $ucty = $q_ucty->execute(array(), Doctrine_Core::HYDRATE_ON_DEMAND); works fine.

fatal error on Swift.php

I'm trying to upgrade a project of min from sf1.4 to sf1.5, but I'm stuck with this problem:

Warning: require_once([project]/lib/vendor/lexpress/symfony1/lib/vendor/swiftmailer/lib/classes/Swift.php): failed to open stream: No such file or directory in [project]/cache/frontend/dev/config/config_factories.yml.php on line 150

the relevant portion of code in config_factories.yml.php is

if (!class_exists('Swift')) {
  $swift_dir = sfConfig::get('sf_swiftmailer_dir', sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/lib');
  require_once $swift_dir.'/classes/Swift.php';
  Swift::registerAutoload($swift_dir.'/swift_init.php');
}

I tried to set class: sfNoMailer in factories.yml (under mailer, under all), no luck. I also tried to remove mailer key from factories.yml, no luck.

Error in sfForm.class.php for embedded form

I found an issue at line 463 of sfForm.class.php.
In the original file (symfony 1.4.20) was:
$this->validatorSchema[$name] = $form->getValidatorSchema();
now is:
$this->validatorSchema[$name] = new sfValidatorPass();

It cause an error in configure functions of form classes when you try to set validator options of an embedded form.

Fix sfAutoload error

Une erreur semble revenir fréquemment sur un de mes projets :

PHP Warning:  unlink(/var/www/project/cache/frontend/dev/config/config_autoload.yml.php): No such file or directory in /var/www/project/lib/vendor/symfony-1.5/lib/autoload/sfAutoload.class.php on line 132

Une solution à ce problème a été apporté ici : palmic/symfony1@2a10db2

Mailer configuration not loaded when using alternate transport class

Hi,

When I config the following in factories.yml:

mailer:
      param:
        delivery_strategy:  single_address
        delivery_address: [email protected]
        transport:
          class: Swift_SmtpTransport
          param:
            host: smtp.example.com
            port: 25
            encryption: ~
            username: user
            password: password

The config options aren't loaded. Here's a var_dump of the $parameters in sfFactoryConfigHandler:

array(4) {
  ["logging"]=>
  string(0) ""
  ["charset"]=>
  string(5) "utf-8"
  ["delivery_strategy"]=>
  string(8) "realtime"
  ["transport"]=>
  array(2) {
    ["class"]=>
    string(19) "Swift_SmtpTransport"
    ["param"]=>
    array(5) {
      ["host"]=>
      string(9) "localhost"
      ["port"]=>
      int(25)
      ["encryption"]=>
      NULL
      ["username"]=>
      NULL
      ["password"]=>
      NULL
    }
  }
}

Is this a bug or am I doing something wrong?

sfFactoryConfigHandler generates a wrong constructor for request instance

Hi,

while inspecting a generated factories cache file (e.i. ./cache/frontend/test/config/config_factories.yml.php I found out that the number of constructor arguments for class sfWebRequest does not match the signature.

Take a look at file sfFactoryConfigHandler:94 on line

$this->factories['request'] = new $class($this->dispatcher, array(), array(), sfConfig::get('sf_factory_request_parameters', '%s'), sfConfig::get('sf_factory_request_attributes', array()));

It initializes a $class instance with 5 arguments:

  1. EventDispatcher
  2. array() hardcoded
  3. array() hardcoded
  4. request parameters
  5. request attributes

Furthermore, the class sfWebRequest (parent sfRequest) has only 4 arguments in constructor:

  1. EventDispatcher
  2. $parameters = array()
  3. $attributes = array()
  4. $options = array()

I came to conclusion that the 5th argument in sfFactoryConfigHandler is unnecessary and won't break any BC if you drop it.

P.S. The extra (e.i. 5th) argument was there for a long time since v1.2

P.P.S. IMHO, the priority of the issue is minor.

broken version of SwiftMailer in composer.json

After upgrade project to sf1.5.3 I'm get a error: PHP Fatal error: Class 'Swift_Encoding' not found...
I'm search this class in all files but anything found.
I'm look SwiftMailer repository and found that the file lib/classes/Swift/Encoding.php with this class was deleted in v.5.2.1 and restored in v.5.3.0 - swiftmailer/swiftmailer@52797f2

SwiftMailer version 5.2.2 is mandatory or it can be replaced by newer version?

Subforms: Id Binding

We have a sub-form called details to entity (id, subscription_id, product_id, quantity) Id is auto increment in the entity.

When a new record, the id is submitted as blank string. With symfony 1.4.17, this is not an issue, however if we use this fork, this blank Id actually is bound to the object and then Doctrine InsertSingle call the ID column is being passed into the database insert statement, as a end result, the insert fails with "IDENTITY INSERT IS SET OFF" error.

Why is blank Id field is being bound in this fork while old Symfony ignores it properly ?

PHP Warning: require_once(/Doctrine/Core.php)

Hello everyone,

I am using symfony1.4 in some of my projects. After upgrading my OS and PHP to 7 version, I am facing problems with symfony1.4, I need to keep my projects a live without upgrading symfony to 2 version.
And I also use Doctrine in all of them.

Now I am trying to move one of my project to lexpress/symfony1 fork.

This is how I am doing:

    1. delete vendor/symfony
    1. run
  • 2.1 composer require lexpress/symfony1 "1.5.*"
  • 2.2 composer install
    1. changed ProjectConfiguration.class.php line 3 to require_once dirname(FILE).'/../lib/vendor/lexpress/symfony1/lib/autoload/sfCoreAutoload.class.php';
    1. trying to do symfony cc, but now I am receiving this error:
  • PHP Warning: require_once(/Doctrine/Core.php)

I attached my terminal screen after run symfony cc cmd.
Also sfDoctrinePlugin/lib/vendor/doctrine is empty as other print screen is showing.

Some way to overcome this problem ?
Thanks in advance.

vendor-doctrine-empty
symfony-cc

sfStopException et sfError404Exception changement de comportement ?

Bonjour,

Nous avons ce bout de code dans notre projet SF1.4 pour tracer les erreurs.
Suite à la migration en 1.5 (test) on n'a plus d'erreur personnalisé sur les 404 on se retrouve avec une page blanche et une exception du type sfStopException

Je m'interroge, est ce que çà vient de Symfony ou plutot de PHP qui aurait changé ?
Pour corriger il m'a suffit de commenter le thow du bloc sfStopException mais je suis perplexe...

class catchErrorFilter extends sfFilter
{
  public function execute ($filterChain)
  {
    // Execute next filter in the chain
    try
    {
      $filterChain->execute();
    }
    catch (sfError404Exception $e)
    {
      throw $e; # propager l'exception
    }
    catch (sfStopException $e)
    {
      //throw $e; # propager l'exception
    }
    // Toute autre exception est reportee
    catch (Exception $e)
    {
      //code pour envoyer un email de rapport d'erreur
      throw $e; # propager l'exception
    }
  }
}

Merci si quelqu'un a une idée de ce qui peut se passer !

Guldil

Separate out the Form BC

A lot of the embedded form stuff is broken by the non-BC Form changes, unsurprisingly, but if you're using a lot of this (as well as plugins that use it), and just need to maintain support for the project, it's hardly worth rewriting it just to maintain compatibility - is it worth separating this out from the other efforts?

Bug in plugin:list command

./symfony plugin:list
Installed plugins:

Warning: require_once(PEAR.php): failed to open stream: No such file or directory in [...]\vendor\lexpress\symfony1\lib\plugin\sfPearEnvironment.class.php on line 15

Coding Style

What do you think about PSR-1/2 and friendsofphp/php-cs-fixer ?
When possible (spaces, braces, etc... without breaking changes such as introducing namespacing)

PHP7 compatibility

Hi, we're also maintaining a Symfony1 fork based on yours. Recently we've made some changes to fix PHP7 compatibility. You can see our internal PR here: Recras#11
We've diverged quite a bit from you're master, so unfortunately I wasn't able to create a PR for you easily. If you're interested in using our changes, feel free.
btw: we decided to stop testing for PHP5.3

ZipExtract Error with composer install on Windows.

When you try to do a composer install on windows it throws an error with the zip extraction. There is no useful error message but googling suggested it is because of a long path names issue on windows. (I'm using Win 7, WAMP server 2, php 5.5.12 )
Workround was to move the project folder up to the drive root and run it there where it worked fine.
Bit of a faff but not too onorous.
Could this be flagged up or could a more useful error message be generated to save others the time tracking this down?

Move Doctrine plugin to another repo

Related to #35.
Now that doctrine1 is just a suggestion, you should create a repository holding sfDoctrinePlugin and move there the whole plugin, that makes no sense without doctrine1.
sfDoctrinePlugin should require doctrine1, while symfony1 should suggest sfDoctrinePlugin instead of doctrine1

False support for PHP 7

"Fork of symfony 1.4 ... and PHP 7.0 support"
It's a lie.

Did you know that originally PHP 7 doesn't support memcache? Memcached must be used instead.
SURPRISE!

  1. lib/vendor/symfony/lib/cache/sfMemcacheCache.class.php:45, 56
  2. lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Cache/Memcache.php:62

Now tell me how your fork adds PHP 7 support.

sfMemcacheCache fail

The tests on travis run without memcache enabled, so the sfMemcacheCacheTest just skips itself.
If I start the memcached server on travis & add the extension to php (5.x), they fail, as you can see here

these 2 methods fail:

 /**
  * @see sfCache
  */
  public function get($key, $default = null)
  {
    $value = $this->memcache->get($this->getOption('prefix').$key);

    return false === $value ? $default : $value;
  }

  /**
   * @see sfCache
   */
  public function has($key)
  {
    return !(false === $this->memcache->get($this->getOption('prefix').$key));
  }

so, if we set('key', false), has('key') is also false, and get('key', 1) returns 1.
somehow it should save that a false key is stored.

Mailer service

It seems like the Mailer service (sf_mailer) would be a good candidate to add to the built-in service container. Is there a reason why it was originally left out from this list or may I submit a PR, specially now that there is sfNoMailer?

Mettre à jour un vieux projet Symfony 1.4

Bonjour,

Bravo pour le travail déjà, ca semble tout bon :)

J'ai un vieux projet Symfony 1.4 que je souhaite migrer en 1.5 et migrer en PHP 5.5 (et tout ce qui suit). Ce projet n'a pas été crée avec composer au départ.

Quelle serait selon vous la meilleur solution pour migrer ?

Merci

Guldil

Does not work when not using composer - or docs needed

I've been trying to integrate your project into an old dinosaur project that needs to be upgraded.

Two issues:

a) If I want to be using composer, how should I autoload/boot the project? Change ProjectConfigurationClass to what? -> Hint/example in the doc would be helpful

b) if not using composer but just clone into lib/vendor (or even another directory), due to the missing composer-autoload, the "Swift" class is unknown and symfony's generated cache/frontend/config/config_factories.yml.phpwill try to load it from /vendor/swiftmailer/lib where you are not keeping it anymore

#taken from generated /cache/frontend/dev/config/config_factories.yml.php
  if (!class_exists('Swift')) {
    $swift_dir = sfConfig::get('sf_swiftmailer_dir',   sfConfig::get('sf_symfony_lib_dir').'/vendor/swiftmailer/lib');
    require_once $swift_dir.'/swift_required.php';
  }

Or did I miss something? If so, please help, and I'll put it in PR for the docs to save the next n00b like me from having the same issue

generate:project fails because it doesn't know where doctrine is

When trying to generate a project using LExpress/symfony1 it throws the following error

PHP Warning: require_once(/Doctrine/Core.php): failed to open stream: No such file or directory in /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php on line 42

It appears that it doesn't know that doctrine is being placed in /vendor/lexpress/doctrine1/lib/Doctrine/ rather then in vendor/lexpress/symfony1/lib/plugins/sfDoctrinePlugin/

$ ./vendor/lexpress/symfony1/data/bin/symfony generate:project example
>> dir+      /srv/example/project_composer_test/lib
>> dir+      /srv/example/project_composer_test/lib/form
>> file+     /srv/example/project_composer_test/lib/form/BaseForm.class.php
>> dir+      /srv/example/project_composer_test/apps
>> dir+      /srv/example/project_composer_test/log
>> dir+      /srv/example/project_composer_test/data
>> dir+      /srv/example/project_composer_test/data/fixtures
>> file+     /srv/example/project_composer_test/data/fixtures/fixtures.yml
>> dir+      /srv/example/project_composer_test/web
>> dir+      /srv/example/project_composer_test/web/css
>> file+     /srv/example/project_composer_test/web/css/main.css
>> dir+      /srv/example/project_composer_test/web/js
>> file+     /srv/example/project_composer_test/web/.htaccess
>> file+     /srv/example/project_composer_test/web/robots.txt
>> dir+      /srv/example/project_composer_test/web/uploads
>> dir+      /srv/example/project_composer_test/web/uploads/assets
>> dir+      /srv/example/project_composer_test/web/images
>> dir+      /srv/example/project_composer_test/cache
>> file+     /srv/example/project_composer_test/symfony
>> dir+      /srv/example/project_composer_test/test
>> dir+      /srv/example/project_composer_test/test/bootstrap
>> file+     /srv/example/project_composer_test/test/bootstrap/functional.php
>> file+     /srv/example/project_composer_test/test/bootstrap/unit.php
>> dir+      /srv/example/project_composer_test/test/functional
>> dir+      /srv/example/project_composer_test/test/unit
>> dir+      /srv/example/project_composer_test/config
>> file+     /srv/example/project_composer_test/config/ProjectConfiguration.class.php
>> file+     /srv/example/project_composer_test/config/properties.ini
>> file+     /srv/example/project_composer_test/config/rsync_exclude.txt
>> tokens    /srv/example/project_composer_test/config/ProjectConfiguration.class.php
>> tokens    /srv/example/project_composer_test/config/properties.ini
>> tokens    /srv/example/project_composer_test/config/rsync_exclude.txt
>> tokens    /srv/example/project_composer_test/config/ProjectConfiguration.class.php
>> tokens    /srv/example/project_composer_test/config/properties.ini
>> tokens    /srv/example/project_composer_test/config/rsync_exclude.txt
>> tokens    /srv/example/project_composer_test/lib/form/BaseForm.class.php
>> file+     /srv/example/project_composer_test/config/databases.yml
>> dir+      /srv/example/project_composer_test/config/doctrine
>> file+     /srv/example/project_composer_test/config/doctrine/schema.yml
PHP Warning:  require_once(/Doctrine/Core.php): failed to open stream: No such file or directory in /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php on line 42
PHP Stack trace:
PHP   1. {main}() /srv/example/project_composer_test/vendor/lexpress/symfony1/data/bin/symfony:0
PHP   2. include() /srv/example/project_composer_test/vendor/lexpress/symfony1/data/bin/symfony:37
PHP   3. sfSymfonyCommandApplication->run() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/command/cli.php:20
PHP   4. sfTask->runFromCLI() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/command/sfSymfonyCommandApplication.class.php:76
PHP   5. sfGenerateProjectTask->doRun() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/sfTask.class.php:97
PHP   6. sfGenerateProjectTask->execute() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/generator/sfGenerateProjectTask.class.php:30
PHP   7. include() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/generator/sfGenerateProjectTask.class.php:128
PHP   8. sfBaseTask->reloadTasks() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/plugins/sfDoctrinePlugin/config/installer.php:5
PHP   9. sfBaseTask->createConfiguration() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/sfBaseTask.class.php:363
PHP  10. sfProjectConfiguration->__construct() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/sfBaseTask.class.php:220
PHP  11. sfProjectConfiguration->loadPlugins() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/config/sfProjectConfiguration.class.php:62
PHP  12. sfPluginConfiguration->__construct() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/config/sfProjectConfiguration.class.php:91
PHP  13. sfDoctrinePluginConfiguration->initialize() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/config/sfPluginConfiguration.class.php:47
PHP Fatal error:  require_once(): Failed opening required '/Doctrine/Core.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php on line 42
PHP Stack trace:
PHP   1. {main}() /srv/example/project_composer_test/vendor/lexpress/symfony1/data/bin/symfony:0
PHP   2. include() /srv/example/project_composer_test/vendor/lexpress/symfony1/data/bin/symfony:37
PHP   3. sfSymfonyCommandApplication->run() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/command/cli.php:20
PHP   4. sfTask->runFromCLI() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/command/sfSymfonyCommandApplication.class.php:76
PHP   5. sfGenerateProjectTask->doRun() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/sfTask.class.php:97
PHP   6. sfGenerateProjectTask->execute() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/generator/sfGenerateProjectTask.class.php:30
PHP   7. include() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/generator/sfGenerateProjectTask.class.php:128
PHP   8. sfBaseTask->reloadTasks() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/plugins/sfDoctrinePlugin/config/installer.php:5
PHP   9. sfBaseTask->createConfiguration() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/sfBaseTask.class.php:363
PHP  10. sfProjectConfiguration->__construct() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/task/sfBaseTask.class.php:220
PHP  11. sfProjectConfiguration->loadPlugins() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/config/sfProjectConfiguration.class.php:62
PHP  12. sfPluginConfiguration->__construct() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/config/sfProjectConfiguration.class.php:91
PHP  13. sfDoctrinePluginConfiguration->initialize() /srv/example/project_composer_test/vendor/lexpress/symfony1/lib/config/sfPluginConfiguration.class.php:47

sfAutoload produces a PHP warning on unlink file

When the debug mode is ON, sometimes this line:

sfAutoload.class.php#L134

produced error message:

PHP Warning:  unlink(/project/cache/api/dev/config/config_autoload.yml.php): No such file or directory in /project/vendor/lexpress/symfony1/lib/autoload/sfAutoload.class.php on line 134
PHP Stack trace:
PHP   1. {main}() /project/web/api_dev.php:0
PHP   2. sfContext->dispatch() /project/web/api_dev.php:14
PHP   3. sfFrontWebController->dispatch() /project/vendor/lexpress/symfony1/lib/util/sfContext.class.php:171
...
PHP  26. class_exists() /project/vendor/lexpress/doctrine1/lib/Doctrine/Record/Generator.php:164
PHP  27. spl_autoload_call() /project/vendor/lexpress/doctrine1/lib/Doctrine/Record/Generator.php:164
PHP  28. sfAutoloadAgain->autoload() /project/vendor/lexpress/doctrine1/lib/Doctrine/Record/Generator.php:164
PHP  29. sfAutoload->reloadClasses() /project/vendor/lexpress/symfony1/lib/autoload/sfAutoloadAgain.class.php:95
PHP  30. unlink() /project/vendor/lexpress/symfony1/lib/autoload/sfAutoload.class.php:134

I know, this it not good approach, but placing a @ before unlink will solve the issue.

Also, file_exists can be replaced with is_file (it's a correct way to check file existence)

Add again Propel from sfDatabaseSessionStorage

I'm trying to use your fork to substitute symfony 1.4 in a project with Propel, but the changes mades in the commit 6aefb3c prevents us to use because we are saving the session data in a database to balance load between servers.

Please, can you revert this change? This does not affect to people that uses Doctrine, but allows the use of Propel with your fork. This way we have not to fork just to change on file of the core.

sfAPCCache fail

The tests on travis run without apc enabled for cli, so the sfAPCCacheTest just skips itself.
If I enable it in php.ini, they fail, as you can see here

Friends of Symfony1 (FOS1) Organization?

From the idea on #100 .. what do you think about merging our efforts to have a FriendsOfSymfony1 (FOS1) organization where let all the Symfony1 related works be unified?

Meaning also to have two different branches of Symfony 1.5.x (with BC-breaks) and Symfony 1.4.x (with fixes and backports only) I saw that other users proposed (and worked) on such 1.4.x updating without BC breaks here: https://github.com/punkave/symfony1 by @boutell

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.