After downloading the source files from ftp of a symfony project to work on, I want to know what is the version o the project? When I didn't found the exact location to run composer!
here is the Tree of the project :
> https://pastebin.com/EkRcpppw
If you can't have access to the console (app/console --version or bin/console --version for Symfony3 ), you could try reading /www/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php, where the version is hardcoded.
In exemple:
const VERSION = '3.2.0';
would means that you have the version 3.2.0 of the Symfony Framework.
Related
I'm working on Linux fedora and I want to use Symfony for a project.
I already installed Symfony, but when I use Symfony commands it doesn't work (command not found).
My goal is to run a server by using this command symfony server:start
The 2 commands I tried (sorry my shell is in French)
package php-symfony-2.8.52-3 already installed
Dependencies solved
Nothing to do
bash : symfony : command not found
You have installed a very old version of the Symfony framework but, you are trying to use the Symfony CLI binary.
Run this installer to create a binary called symfony:
wget https://get.symfony.com/cli/installer -O - | bash
— https://symfony.com/download
Check the setup guide for further reference.
Trying a fresh install of Silverstripe 4.0.1 but only gets this far -
Installing SilverStripe...
I am now running through the installation steps (this should take about 30 seconds)
If you receive a fatal error, refresh this page to continue the installation
Setting up /var/www/duonsdev/public_html/index.php
Setting up /var/www/duonsdev/public_html/mysite/_config.php
Setting up /var/www/duonsdev/public_html/mysite/_config/theme.yml
Setting up /var/www/duonsdev/public_html/.env
Setting up /var/www/duonsdev/public_html/.htaccess
Building database schema...
ERROR [Emergency]: Uncaught TypeError: Return value of Symfony\Component\Filesystem\Filesystem::toIterable() must be an instance of Symfony\Component\Filesystem\iterable, array returned IN POST /install.php Line 729 in /var/www/duonsdev/public_html/vendor/symfony/filesystem/Filesystem.php Source ====== 720: } 721: 722
And the error goes on and on. I tried refresh, but same error.
If I try a dev/build instead then it always dies at the point of -
Index File_Versions.OwnerID: created as index ("OwnerID")
Website Error
There has been an error
The website server has not been able to respond to your request
Trying to setup on Ubuntu 16 on local dev machine running Apache virtual host.
Never had this problem before and setup fine with ss4.0.
Any ideas?
I ran into the same issue, and after checking in the official SilverStripe Community's slack channel, they mentioned this is because I was not running PHP 7.1.
Apparently, the official SilverStripe tarball offered in their website was built with PHP 7.1, so Composer added newer Symfony dependencies. They mentioned this would be fixed in newer releases.
Therefore, there are 2 ways you can fix this issue:
Download SilverStripe with Composer:
$ curl -sS https://getcomposer.org/installer | php
$ ./composer.phar create-project silverstripe/installer /var/www/duonsdev/public_html/
Update your PHP version to 7.1.
After doing any of those steps, you will be able to access the web wizard for installing SilverStripe.
NOTE: If you're on a shared hosting, you will need to download SilverStripe on your local machine (ensuring the PHP version matches, at least in the major version, e.g. 7.0), and upload the files that were generated to your public_html directory.
Make sure the module php version of apache in the same version as the cli php version.
Looks like the error was to do with the php version.
I was installing silverstripe through the cli using composer, but running a different version of php in apache.
So in the cli the php version was php 7.1
But in apache the php version was php 7.0.
After changing the apache php to match the cli (because silverstripe was installed using composer in the cli) it worked!
I am trying working with symfony since past couple of months. Last night I did an auto remove to purge not needed repositories. After that I have not been able to create a new symfony project using the symfony command. When I run Symfony new SecurityDemo 2.8.1 in the terminal,
I get the error
Symfony: command not found
I tried installing the Symfony Installer again as directed in the documentation http://symfony.com/doc/current/setup.html. I went to my root directory and followed the installation procedure as shown in the screenshot
Still I get the same error.
All help is appreciated.
EDIT:
I am working with LAMP and am using PHP 5.6.
When I try to update the symfony Installer using symfony self-update I get the output
// Symfony Installer is already updated to the latest version (1.5.8).
Add the following line to your shell configuration file:
export PATH="$HOME/.symfony/bin:$PATH"
For me the fix was to reinstall symfony:
curl -sS https://get.symfony.com/cli/installer | bash
see here https://symfony.com/download
as far as I experienced, it does not tamper with the environment.
If you're sure you installed the symfony command properly you have to call it with lowercase s and not Symfony.
The correct command is:
$ symfony new SecurityDemo 2.8.1
http://symfony.com/doc/current/setup.html#basing-your-project-on-a-specific-symfony-version
Try call Symfony it in lowercase as example:
>symfony new SecurityDemo 2.8.1
Hope this help
I had the same problem. The right command would be:
php symfony new SecurityDemo 2.8.1
Not sure why it would not work without the word php even though the documentation does not prescribe it.
cd your-project/
composer require symfony/web-server-bundle --dev
php bin/console server:start
Working beautifully for me on Fedora 33 Workstation
base: https://symfony.com/doc/4.0/setup/built_in_web_server.html
Turns out that I cannot use capital 'S' in symfony. using symfony new project_name did the trick.
The Right Command is
symfony new SecurityDemo 2.8.1
If you can’t use the Symfony installer for any reason, you can create Symfony applications with Composer, the dependency manager used by modern PHP applications.
composer create-project symfony/framework-standard-edition SecurityDemo "2.8.1"
make sure you've already install composer.
When you run curl -sS https://get.symfony.com/cli/installer | bash to install Symfony CLI Installer. After installation run either of the next commands:
Use it as a local file:
/root/.symfony5/bin/symfony
Or add the following line to your shell configuration file:
export PATH="$HOME/.symfony5/bin:$PATH"
Or install it globally on your system:
mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
Then start a new shell and run 'symfony'
try this
composer require symfony/flex
composer install
I created a new symfony 2 project using 2.7. When I try to install a plugin using command line "symfony plugin:install sfFormExtraPlugin", I got an error:
"[InvalidArgumentException]
There are no commands defined in the "plugin" namespace.".
When I type "symfony list", I got "
Available commands:
about Symfony Installer Help.
demo Creates a demo Symfony project.
help Displays help for a command
list Lists commands
new Creates a new Symfony project.
self-update Update the installer to the latest version.
selfupdate Update the installer to the latest version.
". no plugin or other command like "cache" etc. What should I do? Thanks!
sfFormExtraPlugin is a plugin for Symfony 1 and won’t work with Symfony 2.*
Also, the symfony command line tool in Symfony 2 is not meant for application commands anymore but for creating new projects/installing Symfony. The new command line tool for application commands is app/console (which you use like php app/console something:something.)
But even then, this command isn’t used for managing dependencies (like plugins) anymore. We use composer for that instead. That’s a powerful package manager for PHP that can install and update the packages you require and also make sure that they are compatible. And it is not limited to the Symfony world.
After having successfully installed and updated all vendors in my project folder for Sylius i tried running this code :
app/console sylius:install --fixtures
I get this error :
PHP Fatal error: Class 'ResourceBundle' not found in C:\wamp\www\sylius\vendor\
symfony\symfony\src\Symfony\Component\Locale\Locale.php on line 51
Then i tried all possible solutions given here
Installed intl extension in php (working successfully).Then ran this command
php build-data.php 'your ICU version'
On running the above command i get this:
'which' is not recognized as an internal or external command,
operable program or batch file.
The command "svn" is not installed
I want to know if there is another workaround to this issue.
Please help and thanks in advance.
P.S. - No SVN runs on my system. And i'm using icu*46.dll
Anyone came across this??
This error relates to be PHP intl-extension. Make sure it is enabled and you have the LATEST version.
quick test:
<?php
var_dump(extension_loaded('intl'));
Make sure your PHP folder is correctly registered in your %PATH% environment variable.
Control Panel - System - Advanced - ...
Without that, the ICU dlls are not loaded by PHP as Apache module - no error message is displayed, but the extension is not enabled.
Check aswell from phpinfo() ! not with ...
php -m
... or ( windows = findstr, linux/cygwin = grep )
php -i | findstr intl
check that the extension is enabled in your php.ini ( dont know WAMP's extenion path so adjust it please )
extension=php_intl.dll
As i can see you are on Windows and using WAMP you will have to get a precompiled version of the extension.
The packages on http://windows.php.net/download/ all contain the php_intl.dll in the ext folder.
Make sure that the ICU is compiled with the same version of MSVC that PHP is.
You run into problems if the ICU was compiled with VC10 and PHP was with VC9.
Although php -m and php -i detect the INTL it wouldn't show up in phpinfo().