I have tested symfony and started with 2.0 now the new 2.0.1 version it out and I want to update. Is there an easy way to update the sources?
In Zend it is basically replacing the Zend folder with new libs. Maybe I can use an script like php bin/vendors install ?
Per the instructions on this post:
If you already have a project based on the Symfony Standard Edition
2.0.0, you can easily upgrade to 2.0.1 by getting the new deps and
deps.lock files.
Then, run the vendors script:
$ ./bin/vendors install
And don't forget to clear your cache:
$ php ./app/console cache:clear
Here are the files:
deps
deps.lock
Related
Everywhere I look in the Symfony documentation for Symfony 4.2, it says that to clear the cache, I run:
php bin/console cache:clear
However, this bin/console is a relative path. I can't find bin/console anywhere. I've done a find on my composer vendor directory. Nothing.
Where is bin/console?
I'm running php 7.2.
Symfony 4.x structures in like this (From CoderSkills)
If you don't have the same after your installation, remove your project folder and create a new ones by running composer create-project symfony/website-skeleton myNewProject
Here is a guide to start a new Symfony project
Is it possible to set the installation order?
Currently I'm using Doctrine module that requires ext-mongo to be installed, but as I'm using the newer php version (7.0) I have mongodb installed instead. There's a alcaeus/mongo-php-adapter package that resolves installation problems. But there's one problem - Composer is trying to install Doctrine modules first, so that installation fails.
Currently I have to resolve this problem manually, but I can't do it any more as I'm going to pack my environment to a Docker image to let it be automatically deployed later.
From the docs of alcaeus/mongo-php-adapter
"
$ composer require alcaeus/mongo-php-adapter
If your project already has a dependency on ext-mongo, the command above may not work. This is due to a bug in composer, see https://github.com/composer/composer/issues/5030
To fix this, you can use the --ignore-platform-reqs switch when running the above command, or when running composer update with no composer.lock file present."
I am new in symfony 3.0. I want to integrate ACL in my project.I am using following environment.
Symfony 3.0
OS: Windows
I did follow below link:
http://symfony.com/doc/current/cookbook/security/acl.html
When I run this command: php bin/console init:acl
I am getting following message:
[LogicException]
You must install symfony/security-acl in order to use the ACL functionality
Can anyone suggest how I can integrate it? Is there any demo URL and from where I can download the code?
You are missing a package that Symfony needs in order to activate ACL on your project.
To install such packages, you'll need to have a working Composer installation (Composer is a PHP dependency management scripts you can use to manage packages): see https://getcomposer.org/download/
Once Composer is running, you can open a console and go to the root of your project. There you can run the following command line option:
composer require symfony/security-acl
followed by:
composer update
Now you should be able to run the php bin/console init:acl command successfully.
i used to to use composer to create a new symfony project like so
composer create-project symfony/symfony-standard-edition SymfonyProjectDir 2.5.*
but know when i want to use the symfony installer i use the command
symfony new SymfonyProjectDir 2.5.*
or
symfony new SymfonyProjectDir 2.5
but i get this error
[RuntimeException]
The Symfony version should be 2.N.M, where N = 0..9 and M = 0..99
new directory [version]
how can i tel that i want to use the version 2.5 including the last updates from symfony like i used to with composer?
There is no reason to have the latest minor version of an version. You start developing with the latest version and then you should freeze it until there is a reason to update.
If you don't care, clone the git repo, grep your tag and create your project with it.
You can try this, it worked for me:
Symfony Installation and Project Creation
Or just open command line and execute these commands:
for (linux/mac)
sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
symfony new SymfonyProjectDir 2.5
The version will be the most recent version in 2.5, as you want
Last answer here is from 2016 so if you end up here somehow in 2019 the solution is much easier!
First make sure you are using a php version of 7.1 or higher.
Check if you have composer installed and if you don't just follow this easy documentation: Download/Install Composer
Now you are all set, go to the directory where you want your symfony project be stored and enter the command composer create-project symfony/website-skeleton my-project. This will create your first structure in symfony 4!
Now you just enter your project directory and type php bin/console server:run on your terminal and you are done.
You can import repositories from git too starting git init from the same project folder.
First time with Symfony? Follow this tutorial for a first controller/view: Introduction to symfony4
Hope this if somehow usefull to anyone, i'm just trying to give something back to this community that has given me so much.
Please try with it:
composer create-project symfony/framework-standard-edition SymfonyProjectDir/ 3.0.7
It should work. Maybe your forgot the last slash...
My Bash refuse to process to a databse update since I've installed gedmo for S2.
I'm wondering if its because I've installed the wrong version of Gedmo.
I have Doctrine 2.1.7 and i need to install the 2.1.x version of gedmo-doctrine-extensions how can specify this to my deps file ?
For now I have
[gedmo-doctrine-extensions]
git=http://github.com/l3pp4rd/DoctrineExtensions.git
But when trying to enter the doctrine:schema:update --force command, I have "Class 'Doctrine\Common\Persistence\Mapping\Driver\DefaultFileLocator' not found in (my path)\vendor\gedmo-doctrine-extension\lib\Gedmo\Mapping\ExtensionMetadataFactory.php on line 170"
So i'm assuming it is due to the version of gedmo I use, Am I Right ?
I'm using 2.3.0 version for my project based on Symfony 2.0.15 and Doctrine 2.1.7
[gedmo-doctrine-extensions]
git=http://github.com/l3pp4rd/DoctrineExtensions.git
version=v2.3.0
Anyhow you can look on http://github.com/l3pp4rd/DoctrineExtensions.git to see what version you want/need and add it into your deps file under version option.
P.S. I guess you already know, but when you add version info into your deps file, you need to run vendors script, or if you're using composer use it to update dependencies.