Logo: Marc Harnist

Index des pages de la catégorie "symfony"

Projet CMS sous Symfony
Le 11/06/2018
Auteur: Marc L. Harnist

Extrait:

Même pas peur! Je me lance dans la création d'un CMS sous Symfony 4 (CMS: content management system: système complet de gestion de contenu d'un site web: créer et modifier soi-même ses pages, même si on ne sait pas programmer! Symfony 4 est un framework, cadre de travail en français, populai" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Même pas peur! Je me lance dans la création d'un CMS sous Symfony 4 (CMS: content management system: système complet de gestion de contenu d'un site web: créer et modifier soi-même ses pages, même si on ne sait pas programmer! Symfony 4 est un framework, cadre de travail en français, populaire et professionnel, qui contient une multitude de programmes utiles à la création et à la gestion d'un site web créé par le français Fabien Potentier.). Ce CMS fonctionnera sous Symfony 4. Ce projet sera un bon exercice de programmation avec ce framework.

Au fil de mes errances et médiations diverses de ces derniers jours, l'idée suffisamment passionnante qui créera suffisamment de motivation pour me pousser à faire des recherches, des expériences et à apprendre, cette idée a jailli: un projet concret: création d'un CMS sous Symfony 4 (restaurants, e-commerce, sans oublier les options de paramétrage du site pour le référencement...)

Episode 1:
J'ai du me rappeler comment créer des pages dans un site avec Symfony.
Le site web en ligne affiche une erreur.
J'ai téléchargé le site sur mon ordinateur afin de travailler en local grâce à l'aide de Filezilla.
J'ai ouvert les cours pour avoir le mode d'emploi.
Rappel: utiliser la console de windows: cmd
Rappel: les commandes pour se déplacer dans le pc avec cd ..
dir
cd Program Files
etc
Constat: PHP introuvable
Installation de PHP 7 dans l'ordinateur fixe dans une pièce au calme, idéale pour la formation et la recherche. Symfony 4 tourne avec PHP 7.
Tests et déplacement dans le disque via la console CMD: réussite
Café
Joie
Suite:

Installer PHP
Le 22/05/2018
Auteur: Marc L. Harnist

Extrait:

si php n'est pas installé, il faut l'installer depuis http://php.net/downloads.php

Ouvrir les variables d'environnement système dans windows (tapez: modifier les variables environnement dans Qora) /variables d'environnement/path/modifier/" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

si php n'est pas installé, il faut l'installer depuis http://php.net/downloads.php

Ouvrir les variables d'environnement système dans windows (tapez: modifier les variables environnement dans Qora) /variables d'environnement/path/modifier/
Ici tapez les chemin de votre fichier php.exe idéalement installé dans C/programmes/php
Tapez donc comme chemin: c\programmes\php.exe (ou parcourir)

status ou show version pour Voir si une migration (base de donnée) est disponible pour votre site web sous Symfony
Le 19/04/2018
Auteur: Marc L. Harnist

Extrait:

Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

== Configuration

>> Name: " (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: 2018-04-11 23:09:26 (20180411230926)
>> Current Version: 2018-04-16 22:43:54 (20180416224354)
>> Next Version: 2018-04-17 16:17:00 (20180417161700)
>> Latest Version: 2018-04-17 16:17:00 (20180417161700)
>> Executed Migrations: 2
>> Executed Unavailable Migrations: 0
>> Available Migrations: 3
>> New Migrations: 1

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status --show-versions

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: 2018-04-11 23:09:26 (20180411230926)
>> Current Version: 2018-04-16 22:43:54 (20180416224354)
>> Next Version: 2018-04-17 16:17:00 (20180417161700)
>> Latest Version: 2018-04-17 16:17:00 (20180417161700)
>> Executed Migrations: 2
>> Executed Unavailable Migrations: 0
>> Available Migrations: 3
>> New Migrations: 1

== Available Migration Versions

>> 2018-04-11 23:09:26 (20180411230926) migrated
>> 2018-04-16 22:43:54 (20180416224354) migrated
>> 2018-04-17 16:17:00 (20180417161700) not migrated

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:migrate

Application Migrations


WARNING! You are about to execute a database migration that could result in schema changes and data lost. Are you sure you wish to continue? (y/n)y
Migrating up to 20180417161700 from 20180416224354

++ migrating 20180417161700

-> INSERT INTO annuaire_categorie(id,libelle) VALUES (1,"Games"),(2,"Intranet"),(3,"E-Commerce")
Migration 20180417161700 failed during Execution. Error An exception occurred while executing 'INSERT INTO annuaire_categorie(id,libelle) VALUES (1,"Games"),(2,"Intranet"),(3,"E-Commerce")':

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'

In AbstractMySQLDriver.php line 74:

An exception occurred while executing 'INSERT INTO annuaire_categorie(id,libelle) VALUES (1,"Games"),(2,"Intranet"),(3,"E
-Commerce")':

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'


In PDOConnection.php line 109:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'


In PDOConnection.php line 107:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'


doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] []


C:\laragon\www\annuaire-application>

Symfony: télécharger les derniers fichiers du dépôt GIT et télécharger la base de donnée en faisant une MIGRATION
Le 19/04/2018
Auteur: Marc L. Harnist

Symfony: télécharger les derniers fichiers du dépôt GIT et télécharger la base de donnée en faisant une MIGRATION" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Symfony: télécharger les derniers fichiers du dépôt GIT et télécharger la base de donnée en faisant une MIGRATION
Le 19/04/2018
Auteur: Marc L. Harnist

Symfony: télécharger les derniers fichiers du dépôt GIT et télécharger la base de donnée en faisant une MIGRATION" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Faire une migration de Symfony: lancer la base de donnée avec la console de windows: cmd
Le 17/04/2018
Auteur: Marc L. Harnist

php bin/console doctrine:migrations:migrate" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Faire une migration de la base de donnée avec Symfony via la console cmd de windows qu'on ouvre dans notre projet local
Le 17/04/2018
Auteur: Marc L. Harnist

Extrait:

//Avant tout démarrer le service de la base de donnée locale en démarrant wamp ou laragon (easyphp ne peut pas faire tourner Symfony)

Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.
<" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

//Avant tout démarrer le service de la base de donnée locale en démarrant wamp ou laragon (easyphp ne peut pas faire tourner Symfony)

Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

On demande s'il existe une mise à jour de la table prévue avec "status"
C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

In AbstractMySQLDriver.php line 112:

An exception occurred in driver: SQLSTATE[HY000] [2002] Aucune connexion na pu tre tablie car lordinateur cible
la expressment refuse.


In PDOConnection.php line 50:

SQLSTATE[HY000] [2002] Aucune connexion na pu tre tablie car lordinateur cible la expressment refuse.


In PDOConnection.php line 46:

SQLSTATE[HY000] [2002] Aucune connexion na pu tre tablie car lordinateur cible la expressment refuse.


doctrine:migrations:status [--show-versions] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]


C:\laragon\www\annuaire-application>user
'user' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>?
'?' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: 0
>> Current Version: 2018-04-11 23:09:26 (20180411230926)
>> Next Version: 2018-04-16 22:43:54 (20180416224354)
>> Latest Version: 2018-04-16 22:43:54 (20180416224354)
>> Executed Migrations: 1
>> Executed Unavailable Migrations: 0
>> Available Migrations: 2
>> New Migrations: 1

C:\laragon\www\annuaire-application>?
'?' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>user
'user' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

On demande la mise à jour
C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:migrate

Application Migrations


WARNING! You are about to execute a database migration that could result in schema changes and data lost. Are you sure you wish to continue? (y/n)y
Migrating up to 20180416224354 from 20180411230926

++ migrating 20180416224354

-> CREATE TABLE annuaire_application (id INT AUTO_INCREMENT NOT NULL, categorie_id INT NOT NULL, name VARCHAR(255) NOT NULL, libelle VARCHAR(255) NOT NULL, INDEX IDX_EE30DD35BCF5E72D (categorie_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
-> CREATE TABLE photo (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, extension VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
-> CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, photo_id INT DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D6497E9E4C8C (photo_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
-> ALTER TABLE annuaire_application ADD CONSTRAINT FK_EE30DD35BCF5E72D FOREIGN KEY (categorie_id) REFERENCES annuaire_categorie (id)
-> ALTER TABLE user ADD CONSTRAINT FK_8D93D6497E9E4C8C FOREIGN KEY (photo_id) REFERENCES photo (id)

++ migrated (1.6s)

------------------------

++ finished in 1.6s
++ 1 migrations executed
++ 5 sql queries

C:\laragon\www\annuaire-application>

La doc Symfony
Le 12/04/2018
Auteur: Marc L. Harnist

Documentation indispensable" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Avec Symfony, on peut créer une base de données et ses tables via la console cmd de windows
Le 12/04/2018
Auteur: Marc L. Harnist

Extrait:



voici le code tapé ou affiché dans la console:

C:\laragon\www\annuaire-application>php bin/console debug:autowiring

// La console va afficher maintenant la liste des services de Symfony

" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier



voici le code tapé ou affiché dans la console:

C:\laragon\www\annuaire-application>php bin/console debug:autowiring

// La console va afficher maintenant la liste des services de Symfony


Autowirable Services
====================

The following classes & interfaces can be used as type-hints when autowiring:

------------------------------------------------------------------------------------
App\Configuration
App\Controller\AnnuaireController
App\Controller\HomeController
App\Games\Zoo\Controller\AnimalController
App\Games\Zoo\Controller\ZooController
App\Repository\AnnuaireCategorieRepository
App\Service\Notification
Doctrine\Common\Annotations\Reader
alias to annotations.cached_reader
Doctrine\Common\Persistence\ManagerRegistry
alias to doctrine
Doctrine\Common\Persistence\ObjectManager
alias to doctrine.orm.default_entity_manager
Doctrine\DBAL\Connection
alias to doctrine.dbal.default_connection
Doctrine\DBAL\Driver\Connection
alias to doctrine.dbal.default_connection
Doctrine\ORM\EntityManagerInterface
alias to doctrine.orm.default_entity_manager
EasyCorp\EasyLog\EasyLogHandler
Psr\Cache\CacheItemPoolInterface
alias to cache.app
Psr\Container\ContainerInterface
alias to service_container
Psr\Log\LoggerInterface
alias to monolog.logger
SessionHandlerInterface
alias to session.handler
Swift_Mailer
alias to swiftmailer.mailer.default
Swift_Spool
alias to swiftmailer.mailer.default.spool.memory
Swift_Transport
alias to swiftmailer.mailer.default.transport.spool
Symfony\Bridge\Doctrine\RegistryInterface
alias to doctrine
Symfony\Bundle\FrameworkBundle\Controller\RedirectController
Symfony\Bundle\FrameworkBundle\Controller\TemplateController
Symfony\Component\Asset\Packages
alias to assets.packages
Symfony\Component\Cache\Adapter\AdapterInterface
alias to cache.app
Symfony\Component\DependencyInjection\ContainerInterface
alias to service_container
Symfony\Component\EventDispatcher\EventDispatcherInterface
alias to debug.event_dispatcher
Symfony\Component\Filesystem\Filesystem
alias to filesystem
Symfony\Component\Form\FormFactoryInterface
alias to form.factory
Symfony\Component\Form\FormRegistryInterface
alias to form.registry
Symfony\Component\Form\ResolvedFormTypeFactoryInterface
alias to form.resolved_type_factory
Symfony\Component\HttpFoundation\RequestStack
alias to request_stack
Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface
alias to session.flash_bag
Symfony\Component\HttpFoundation\Session\SessionInterface
alias to session
Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface
alias to session.storage.native
Symfony\Component\HttpKernel\Config\FileLocator
alias to file_locator
Symfony\Component\HttpKernel\Debug\FileLinkFormatter
alias to debug.file_link_formatter
Symfony\Component\HttpKernel\HttpKernelInterface
alias to http_kernel
Symfony\Component\HttpKernel\KernelInterface
alias to kernel
Symfony\Component\PropertyAccess\PropertyAccessorInterface
alias to property_accessor
Symfony\Component\Routing\Generator\UrlGeneratorInterface
alias to router.default
Symfony\Component\Routing\Matcher\UrlMatcherInterface
alias to router.default
Symfony\Component\Routing\RequestContext
alias to router.request_context
Symfony\Component\Routing\RequestContextAwareInterface
alias to router.default
Symfony\Component\Routing\RouterInterface
alias to router.default
Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface
alias to security.authentication.manager
Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
alias to security.token_storage
Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface
alias to debug.security.access.decision_manager
Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
alias to security.authorization_checker
Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface
alias to security.encoder_factory.generic
Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface
alias to security.user_password_encoder.generic
Symfony\Component\Security\Core\Security
alias to security.helper
Symfony\Component\Security\Core\User\UserCheckerInterface
alias to security.user_checker
Symfony\Component\Security\Csrf\CsrfTokenManagerInterface
alias to security.csrf.token_manager
Symfony\Component\Security\Csrf\TokenGenerator\TokenGeneratorInterface
alias to security.csrf.token_generator
Symfony\Component\Security\Csrf\TokenStorage\TokenStorageInterface
alias to security.csrf.token_storage
Symfony\Component\Security\Guard\GuardAuthenticatorHandler
alias to security.authentication.guard_handler
Symfony\Component\Security\Http\Authentication\AuthenticationUtils
alias to security.authentication_utils
Symfony\Component\Security\Http\Firewall
alias to debug.security.firewall
Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface
alias to security.authentication.session_strategy
Symfony\Component\Serializer\Encoder\DecoderInterface
alias to serializer
Symfony\Component\Serializer\Encoder\EncoderInterface
alias to serializer
Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface
alias to serializer.mapping.class_metadata_factory
Symfony\Component\Serializer\Normalizer\DenormalizerInterface
alias to serializer
Symfony\Component\Serializer\Normalizer\NormalizerInterface
alias to serializer
Symfony\Component\Serializer\Normalizer\ObjectNormalizer
alias to serializer.normalizer.object
Symfony\Component\Serializer\SerializerInterface
alias to serializer
Symfony\Component\Stopwatch\Stopwatch
alias to debug.stopwatch
Symfony\Component\Translation\TranslatorInterface
alias to translator.data_collector
Symfony\Component\Validator\Validator\ValidatorInterface
alias to debug.validator
Twig\Environment
alias to twig
Twig_Environment
alias to twig
------------------------------------------------------------------------------------

C:\laragon\www\annuaire-application>php bin/console doctrine:database:create


Created database `annuaire_applications` for connection named default

C:\laragon\www\annuaire-application>php bin/console doctrine:database:create
C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status


== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: Already at first version
>> Current Version: 0
>> Next Version: 2018-04-11 23:09:26 (20180411230926)
>> Latest Version: 2018-04-11 23:09:26 (20180411230926)
>> Executed Migrations: 0
>> Executed Unavailable Migrations: 0
>> Available Migrations: 1
>> New Migrations: 1

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status --show-versions

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: Already at first version
>> Current Version: 0
>> Next Version: 2018-04-11 23:09:26 (20180411230926)
>> Latest Version: 2018-04-11 23:09:26 (20180411230926)
>> Executed Migrations: 0
>> Executed Unavailable Migrations: 0
>> Available Migrations: 1
>> New Migrations: 1

== Available Migration Versions

>> 2018-04-11 23:09:26 (20180411230926) not migrated

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: Already at first version
>> Current Version: 0
>> Next Version: 2018-04-11 23:09:26 (20180411230926)
>> Latest Version: 2018-04-11 23:09:26 (20180411230926)
>> Executed Migrations: 0
>> Executed Unavailable Migrations: 0
>> Available Migrations: 1
>> New Migrations: 1

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status --show-versions

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: Already at first version
>> Current Version: 0
>> Next Version: 2018-04-11 23:09:26 (20180411230926)
>> Latest Version: 2018-04-11 23:09:26 (20180411230926)
>> Executed Migrations: 0
>> Executed Unavailable Migrations: 0
>> Available Migrations: 1
>> New Migrations: 1

== Available Migration Versions

>> 2018-04-11 23:09:26 (20180411230926) not migrated

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:migrate

Application Migrations


WARNING! You are about to execute a database migration that could result in schema changes and data lost. Are you sure you wish to continue? (y/n)y
Migrating up to 20180411230926 from 0

++ migrating 20180411230926

-> CREATE TABLE annuaire_categorie (id INT AUTO_INCREMENT NOT NULL, libelle VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB

++ migrated (1.18s)

------------------------

++ finished in 1.18s
++ 1 migrations executed
++ 1 sql queries

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status --show-versions

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: 0
>> Current Version: 2018-04-11 23:09:26 (20180411230926)
>> Next Version: Already at latest version
>> Latest Version: 2018-04-11 23:09:26 (20180411230926)
>> Executed Migrations: 1
>> Executed Unavailable Migrations: 0
>> Available Migrations: 1
>> New Migrations: 0

== Available Migration Versions

>> 2018-04-11 23:09:26 (20180411230926) migrated

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:migrate 0

Application Migrations

Utiliser la barre d'accès rapide de symfony
Le 10/04/2018
Auteur: Marc L. Harnist

" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Créer un controller dans symfony
Le 10/04/2018
Auteur: Marc L. Harnist

Extrait:

Dans le fichier d'un projet: annuaire-application\src\Games\Zoo\config\routing.yml

Il faut indenter avec 4 espaces sinon symfony plante.

animal_show:
path: /animal/show/{id} // {} signifie: c'est une var" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Dans le fichier d'un projet: annuaire-application\src\Games\Zoo\config\routing.yml

Il faut indenter avec 4 espaces sinon symfony plante.

animal_show:
path: /animal/show/{id} // {} signifie: c'est une variable
controller: App\Games\Zoo\Controller\ZooController::show
requirements: //doit être obligatoirement
id: '\d+' // \d -> doit être un entier, + -> au moins un entier

Commentaires sur un fichier controller de Symfony
Le 10/04/2018
Auteur: Marc L. Harnist

Extrait:

Fichier chez Sylvans: W:\DeveloppeurIntegrateurWeb\Marc\annuaire-application\src\Games\Zoo\Controller\ZooController.php


< ? php
namespace App\Games\Zoo\Controller; // chemin de l'applications pour éviter doublons et bugs
// App est un repertoire virtuel. Il est " (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Fichier chez Sylvans: W:\DeveloppeurIntegrateurWeb\Marc\annuaire-application\src\Games\Zoo\Controller\ZooController.php


< ? php
namespace App\Games\Zoo\Controller; // chemin de l'applications pour éviter doublons et bugs
// App est un repertoire virtuel. Il est créé par Symfony

use Symfony\Bundle\FrameworkBundle\Controller\Controller; // use: on va utiliser
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

class ZooController extends Controller{

public function index(){

return $this->render('Games/Zoo/home.html.twig'); // twig va interpréter son code

}

public function add(){

//Validation
//Ecriture en BD

return $this->redirectToRoute('zoo_home');

}

public function show($page, Request $request){

$html = "";

//Cours 3 : Route
$html .= "

Bienvenue dans le zoo numéro $page !

";
$html .= "

Voici comment vous y avez accédé en relatif : ".$this->generateUrl("zoo_show",array("page"=>$page))."

";
$html .= "

Voici comment vous y avez accédé en absolu : ".$this->get('router')->generate("zoo_show",array("page"=>$page),UrlGeneratorInterface::ABSOLUTE_URL)."

";

//Cours 4 : Contrôleur
$html .= "

Paramètre page en GET : ".$request->query->get('attr')."

";

$html .= "";

return new Response($html);

}

}

Twig chez Symfony
Le 10/04/2018
Auteur: Marc L. Harnist

Deux accolages: affichage {{ }}
Accolade + % = action.
Exemple: foreach" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Comment et où faut-il ouvrir la console CMD de windows pour démarrer le serveur
Le 09/04/2018
Auteur: Marc L. Harnist

Extrait:

Il faut ouvrir la console de windows (cmd) dans www/annuaire-application/ puis remplacer le chemin en haut par cmd + enter
La console de win s'ouvre
tapez php bin/console

si php n'est pas installé, il faut l'installer depuis http://php.net/downloads.php

O" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Il faut ouvrir la console de windows (cmd) dans www/annuaire-application/ puis remplacer le chemin en haut par cmd + enter
La console de win s'ouvre
tapez php bin/console

si php n'est pas installé, il faut l'installer depuis http://php.net/downloads.php

Ouvrir les variables d'environnement système dans windows (tapez: modifier les variables environnement dans Qora) /variables d'environnement/path/modifier/
Ici tapez les chemin de votre fichier php.exe idéalement installé dans C/programmes/php
Tapez donc comme chemin: c\programmes\php.exe (ou parcourir)

Ensuite retourner dans la console cmd et tapez: php bin/console

Démarrer Symfony: Ouverture de PHP en Client Ligne De Commande (CLI)
Le 09/04/2018
Auteur: Marc L. Harnist

Extrait:

Microsoft Windows [version 10.0.16299.309]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\wamp64\www\annuaire-application>php bin/console
Symfony 4.0.8 (kernel: src, env: dev, debug: true)

Usage:
command [op" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Microsoft Windows [version 10.0.16299.309]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\wamp64\www\annuaire-application>php bin/console
Symfony 4.0.8 (kernel: src, env: dev, debug: true)

Usage:
command [options] [arguments]

Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env=ENV The Environment name. [default: "dev"]
--no-debug Switches off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
about Displays information about the current project
help Displays help for a command
list Lists commands
assets
assets:install Installs bundles web assets under a public directory
cache
cache:clear Clears the cache
cache:pool:clear Clears cache pools
cache:pool:prune Prunes cache pools
cache:warmup Warms up an empty cache
config
config:dump-reference Dumps the default configuration for an extension
debug
debug:autowiring Lists classes/interfaces you can use for autowiring
debug:config Dumps the current configuration for an extension
debug:container Displays current services for an application
debug:event-dispatcher Displays configured listeners for an application
debug:form Displays form type information
debug:router Displays current routes for an application
debug:swiftmailer Displays current mailers for an application
debug:translation Displays translation messages information
debug:twig Shows a list of twig functions, filters, globals and tests
doctrine
doctrine:cache:clear-collection-region Clear a second-level cache collection region
doctrine:cache:clear-entity-region Clear a second-level cache entity region
doctrine:cache:clear-metadata Clears all metadata cache for an entity manager
doctrine:cache:clear-query Clears all query cache for an entity manager
doctrine:cache:clear-query-region Clear a second-level cache query region
doctrine:cache:clear-result Clears result cache for an entity manager
doctrine:cache:contains Check if a cache entry exists
doctrine:cache:delete Delete a cache entry
doctrine:cache:flush [doctrine:cache:clear] Flush a given cache
doctrine:cache:stats Get stats on a given cache provider
doctrine:database:create Creates the configured database
doctrine:database:drop Drops the configured database
doctrine:database:import Import SQL file(s) directly to Database.
doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment
doctrine:generate:entities [generate:doctrine:entities] Generates entity classes and method stubs from your mapping information
doctrine:mapping:convert [orm:convert:mapping] Convert mapping information between supported formats
doctrine:mapping:import Imports mapping information from an existing database
doctrine:mapping:info
doctrine:migrations:diff Generate a migration by comparing your current database to your mapping information.
doctrine:migrations:execute Execute a single migration version up or down manually.
doctrine:migrations:generate Generate a blank migration class.
doctrine:migrations:latest Outputs the latest version number
doctrine:migrations:migrate Execute a migration to a specified version or the latest available version.
doctrine:migrations:status View the status of a set of migrations.
doctrine:migrations:version Manually add and delete migration versions from the version table.
doctrine:query:dql Executes arbitrary DQL directly from the command line
doctrine:query:sql Executes arbitrary SQL directly from the command line.
doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema
doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema
doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata
doctrine:schema:validate Validate the mapping files
lint
lint:twig Lints a template and outputs encountered errors
lint:xliff Lints a XLIFF file and outputs encountered errors
lint:yaml Lints a file and outputs encountered errors
make
make:auth Creates an empty Guard authenticator
make:command Creates a new console command class
make:controller Creates a new controller class
make:crud Creates CRUD for Doctrine entity class
make:entity Creates or updates a Doctrine entity class
make:fixtures Creates a new class to load Doctrine fixtures
make:form Creates a new form class
make:functional-test Creates a new functional test class
make:migration Creates a new migration based on database changes.
make:serializer:encoder Creates a new serializer encoder class
make:subscriber Creates a new event subscriber class
make:twig-extension Creates a new Twig extension class
make:unit-test Creates a new unit test class
make:validator Creates a new validator and constraint class
make:voter Creates a new security voter class
router
router:match Helps debug routes by simulating a path info match
security
security:encode-password Encodes a password.
server
server:log Starts a log server that displays logs in real time
server:run Runs a local web server
server:start Starts a local web server in the background
server:status Outputs the status of the local web server for the given address
server:stop Stops the local web server that was started with the server:start command
swiftmailer
swiftmailer:email:send Send simple email message
swiftmailer:spool:send Sends emails from the spool
translation
translation:update Updates the translation file

C:\wamp64\www\annuaire-application>php bin/console
Symfony 4.0.8 (kernel: src, env: dev, debug: true)

Usage:
command [options] [arguments]

Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env=ENV The Environment name. [default: "dev"]
--no-debug Switches off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
about Displays information about the current project
help Displays help for a command
list Lists commands
assets
assets:install Installs bundles web assets under a public directory
cache
cache:clear Clears the cache
cache:pool:clear Clears cache pools
cache:pool:prune Prunes cache pools
cache:warmup Warms up an empty cache
config
config:dump-reference Dumps the default configuration for an extension
debug
debug:autowiring Lists classes/interfaces you can use for autowiring
debug:config Dumps the current configuration for an extension
debug:container Displays current services for an application
debug:event-dispatcher Displays configured listeners for an application
debug:form Displays form type information
debug:router Displays current routes for an application
debug:swiftmailer Displays current mailers for an application
debug:translation Displays translation messages information
debug:twig Shows a list of twig functions, filters, globals and tests
doctrine
doctrine:cache:clear-collection-region Clear a second-level cache collection region
doctrine:cache:clear-entity-region Clear a second-level cache entity region
doctrine:cache:clear-metadata Clears all metadata cache for an entity manager
doctrine:cache:clear-query Clears all query cache for an entity manager
doctrine:cache:clear-query-region Clear a second-level cache query region
doctrine:cache:clear-result Clears result cache for an entity manager
doctrine:cache:contains Check if a cache entry exists
doctrine:cache:delete Delete a cache entry
doctrine:cache:flush [doctrine:cache:clear] Flush a given cache
doctrine:cache:stats Get stats on a given cache provider
doctrine:database:create Creates the configured database
doctrine:database:drop Drops the configured database
doctrine:database:import Import SQL file(s) directly to Database.
doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment
doctrine:generate:entities [generate:doctrine:entities] Generates entity classes and method stubs from your mapping information
doctrine:mapping:convert [orm:convert:mapping] Convert mapping information between supported formats
doctrine:mapping:import Imports mapping information from an existing database
doctrine:mapping:info
doctrine:migrations:diff Generate a migration by comparing your current database to your mapping information.
doctrine:migrations:execute Execute a single migration version up or down manually.
doctrine:migrations:generate Generate a blank migration class.
doctrine:migrations:latest Outputs the latest version number
doctrine:migrations:migrate Execute a migration to a specified version or the latest available version.
doctrine:migrations:status View the status of a set of migrations.
doctrine:migrations:version Manually add and delete migration versions from the version table.
doctrine:query:dql Executes arbitrary DQL directly from the command line
doctrine:query:sql Executes arbitrary SQL directly from the command line.
doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema
doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema
doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata
doctrine:schema:validate Validate the mapping files
lint
lint:twig Lints a template and outputs encountered errors
lint:xliff Lints a XLIFF file and outputs encountered errors
lint:yaml Lints a file and outputs encountered errors
make
make:auth Creates an empty Guard authenticator
make:command Creates a new console command class
make:controller Creates a new controller class
make:crud Creates CRUD for Doctrine entity class
make:entity Creates or updates a Doctrine entity class
make:fixtures Creates a new class to load Doctrine fixtures
make:form Creates a new form class
make:functional-test Creates a new functional test class
make:migration Creates a new migration based on database changes.
make:serializer:encoder Creates a new serializer encoder class
make:subscriber Creates a new event subscriber class
make:twig-extension Creates a new Twig extension class
make:unit-test Creates a new unit test class
make:validator Creates a new validator and constraint class
make:voter Creates a new security voter class
router
router:match Helps debug routes by simulating a path info match
security
security:encode-password Encodes a password.
server
server:log Starts a log server that displays logs in real time
server:run Runs a local web server
server:start Starts a local web server in the background
server:status Outputs the status of the local web server for the given address
server:stop Stops the local web server that was started with the server:start command
swiftmailer
swiftmailer:email:send Send simple email message
swiftmailer:spool:send Sends emails from the spool
translation
translation:update Updates the translation file

C:\wamp64\www\annuaire-application>php bin/console server:start


[ERROR] This command needs the pcntl extension to run.

You can either install it or use the "server:run" command instead.


Do you want to execute server:run immediately? (yes/no) [no]:
> yes




[OK] Server listening on http://127.0.0.1:8001


// Quit the server with CONTROL-C.

[Mon Apr 9 11:02:32 2018] 127.0.0.1:52699 [200]: /
[Mon Apr 9 11:02:34 2018] 127.0.0.1:52700 [200]: /_wdt/dacde7
[Mon Apr 9 11:02:36 2018] 127.0.0.1:52704 [404]: /favicon.ico

Exemple de démarrage du serveur pour Symfony avec la console cmd
Le 07/04/2018
Auteur: Marc L. Harnist

Extrait:

Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

In AbstractMySQLDriver.php line 112:

An exception occurred in driver" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

In AbstractMySQLDriver.php line 112:

An exception occurred in driver: SQLSTATE[HY000] [2002] Aucune connexion na pu tre tablie car lordinateur cible
la expressment refuse.


In PDOConnection.php line 50:

SQLSTATE[HY000] [2002] Aucune connexion na pu tre tablie car lordinateur cible la expressment refuse.


In PDOConnection.php line 46:

SQLSTATE[HY000] [2002] Aucune connexion na pu tre tablie car lordinateur cible la expressment refuse.


doctrine:migrations:status [--show-versions] [--configuration [CONFIGURATION]] [--db-configuration [DB-CONFIGURATION]] [--db DB] [--em EM] [--shard SHARD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--]


C:\laragon\www\annuaire-application>user
'user' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>?
'?' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:status

== Configuration

>> Name: Application Migrations
>> Database Driver: pdo_mysql
>> Database Name: annuaire_applications
>> Configuration Source: manually configured
>> Version Table Name: migration_versions
>> Version Column Name: version
>> Migrations Namespace: DoctrineMigrations
>> Migrations Directory: C:\laragon\www\annuaire-application/src/Migrations
>> Previous Version: 0
>> Current Version: 2018-04-11 23:09:26 (20180411230926)
>> Next Version: 2018-04-16 22:43:54 (20180416224354)
>> Latest Version: 2018-04-16 22:43:54 (20180416224354)
>> Executed Migrations: 1
>> Executed Unavailable Migrations: 0
>> Available Migrations: 2
>> New Migrations: 1

C:\laragon\www\annuaire-application>?
'?' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>user
'user' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>php bin/console doctrine:migrations:migrate

Application Migrations


WARNING! You are about to execute a database migration that could result in schema changes and data lost. Are you sure you wish to continue? (y/n)y
Migrating up to 20180416224354 from 20180411230926

++ migrating 20180416224354

-> CREATE TABLE annuaire_application (id INT AUTO_INCREMENT NOT NULL, categorie_id INT NOT NULL, name VARCHAR(255) NOT NULL, libelle VARCHAR(255) NOT NULL, INDEX IDX_EE30DD35BCF5E72D (categorie_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
-> CREATE TABLE photo (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, extension VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
-> CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, photo_id INT DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D6497E9E4C8C (photo_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB
-> ALTER TABLE annuaire_application ADD CONSTRAINT FK_EE30DD35BCF5E72D FOREIGN KEY (categorie_id) REFERENCES annuaire_categorie (id)
-> ALTER TABLE user ADD CONSTRAINT FK_8D93D6497E9E4C8C FOREIGN KEY (photo_id) REFERENCES photo (id)

++ migrated (1.6s)

------------------------

++ finished in 1.6s
++ 1 migrations executed
++ 5 sql queries

C:\laragon\www\annuaire-application>user
'user' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>?
'?' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

C:\laragon\www\annuaire-application>php bin/console make:entity User

Your entity already exists! So let's add some new fields!

New property name (press to stop adding fields):
> created: src/Entity/User.php


[ERROR] "created: src/Entity/User.php" is not a valid PHP property name.

New property name (press to stop adding fields):
> photo


[ERROR] The "photo" property already exists.

New property name (press to stop adding fields):
>



Success!


Next: When you're ready, create a migration with make:migration


C:\laragon\www\annuaire-application>
C:\laragon\www\annuaire-application>
C:\laragon\www\annuaire-application>
C:\laragon\www\annuaire-application>
C:\laragon\www\annuaire-application>
C:\laragon\www\annuaire-application>
C:\laragon\www\annuaire-application>php server:start
Could not open input file: server:start

C:\laragon\www\annuaire-application>php bin/console server:start

[ERROR] This command needs the pcntl extension to run.

You can either install it or use the "server:run" command instead.

Do you want to execute server:run immediately? (yes/no) [no]:
> y


[OK] Server listening on http://127.0.0.1:8000

// Quit the server with CONTROL-C.

[Tue Apr 17 11:28:29 2018] 127.0.0.1:58025 [200]: /
[Tue Apr 17 11:28:30 2018] 127.0.0.1:58026 [200]: /_wdt/522326
[Tue Apr 17 11:28:31 2018] 127.0.0.1:58027 [404]: /favicon.ico
[Tue Apr 17 11:28:32 2018] 127.0.0.1:58028 [200]: /annuaire
[Tue Apr 17 11:28:32 2018] 127.0.0.1:58029 [200]: /_wdt/6db7ff
[Tue Apr 17 11:28:34 2018] 127.0.0.1:58030 [200]: /games/zoo/
[Tue Apr 17 11:28:34 2018] 127.0.0.1:58031 [200]: /_wdt/0683c7
[Tue Apr 17 11:28:38 2018] 127.0.0.1:58032 [404]: /games/zoo/admin
[Tue Apr 17 11:28:39 2018] 127.0.0.1:58033 [200]: /_wdt/433a19
[Tue Apr 17 11:29:05 2018] 127.0.0.1:58042 [301]: /admin/annuaire/application
[Tue Apr 17 11:29:06 2018] 127.0.0.1:58043 [200]: /admin/annuaire/application/
[Tue Apr 17 11:29:23 2018] 127.0.0.1:58051 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:29:29 2018] 127.0.0.1:58053 [200]: /admin/annuaire/application/
[Tue Apr 17 11:29:31 2018] 127.0.0.1:58055 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:42:09 2018] 127.0.0.1:58080 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:42:31 2018] 127.0.0.1:58082 [500]: /admin/annuaire/application/new
[Tue Apr 17 11:42:31 2018] 127.0.0.1:58084 [200]: /_wdt/1f652a
[Tue Apr 17 11:43:38 2018] 127.0.0.1:58085 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:46:37 2018] 127.0.0.1:58102 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:46:42 2018] 127.0.0.1:58104 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:46:43 2018] 127.0.0.1:58106 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:46:43 2018] 127.0.0.1:58108 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:46:58 2018] 127.0.0.1:58110 [200]: /admin/annuaire/application/new
[Tue Apr 17 11:47:36 2018] 127.0.0.1:58112 [302]: /admin/annuaire/application/new
[Tue Apr 17 11:47:37 2018] 127.0.0.1:58114 [200]: /admin/annuaire/application/
[Tue Apr 17 11:50:40 2018] 127.0.0.1:58121 [200]: /admin/annuaire/application/1
[Tue Apr 17 11:50:42 2018] 127.0.0.1:58123 [200]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:50:46 2018] 127.0.0.1:58125 [302]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:50:46 2018] 127.0.0.1:58127 [200]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:50:51 2018] 127.0.0.1:58129 [302]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:50:51 2018] 127.0.0.1:58131 [200]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:50:53 2018] 127.0.0.1:58133 [200]: /admin/annuaire/application/
[Tue Apr 17 11:50:56 2018] 127.0.0.1:58135 [200]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:50:59 2018] 127.0.0.1:58137 [302]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:51:00 2018] 127.0.0.1:58139 [200]: /admin/annuaire/application/1/edit
[Tue Apr 17 11:51:03 2018] 127.0.0.1:58141 [200]: /admin/annuaire/application/
[Tue Apr 17 12:25:27 2018] 127.0.0.1:58179 [200]: /admin/annuaire/application/new
[Tue Apr 17 12:25:42 2018] 127.0.0.1:58181 [302]: /admin/annuaire/application/new
[Tue Apr 17 12:25:42 2018] 127.0.0.1:58183 [200]: /admin/annuaire/application/
[Tue Apr 17 12:25:46 2018] 127.0.0.1:58185 [200]: /admin/annuaire/application/2
[Tue Apr 17 12:25:49 2018] 127.0.0.1:58187 [200]: /admin/annuaire/application/

Pour faire tourner Symfony, il faut installer Wamp et PHP7
Le 06/04/2018
Auteur: Marc L. Harnist

Extrait:

Il faut utiliser Wamp ou laragon: easyphp version php 7 difficilement modifiable.
Installer php 7 dans votre PC

si php n'est pas installé, il faut l'installer depuis http://php.net/downloads.php

Ouvrir les variables d'environnement système dans windows (tapez: " (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Il faut utiliser Wamp ou laragon: easyphp version php 7 difficilement modifiable.
Installer php 7 dans votre PC

si php n'est pas installé, il faut l'installer depuis http://php.net/downloads.php

Ouvrir les variables d'environnement système dans windows (tapez: modifier les variables environnement dans Qora) /variables d'environnement/path/modifier/
Ici tapez les chemin de votre fichier php.exe idéalement installé dans C/programmes/php
Tapez donc comme chemin: c\programmes\php.exe (ou parcourir)

Modifier les systeme/variables environnement en créant un chemin (path) en cliquant sur path en bas dans le menu des variables d'environnement, cliquer sur "nouveau" et écrire le chemin vers php.exe, par exemple:
C:\laragon\bin\php\php-7.1.14-Win32-VC14-x64

Ensuite retourner dans la console cmd et tapez: php bin/console

Ouvrir localhost dans votre navigateur: quel port?
Le 06/04/2018
Auteur: Marc L. Harnist

Extrait:

Lire le message sur la console cmd de Windows:
Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\laragon\www\annuaire-application>php bin/console server:start

[ERROR] This command needs the pcntl extensi" (Pour ouvrir l'article dans une nouvelle fenêtre, cliquez sur le titre)

Texte entier

Lire le message sur la console cmd de Windows:
Microsoft Windows [version 10.0.16299.371]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\laragon\www\annuaire-application>php bin/console server:start

[ERROR] This command needs the pcntl extension to run.

You can either install it or use the "server:run" command instead.

Do you want to execute server:run immediately? (yes/no) [no]:
> y


[OK] Server listening on http://127.0.0.1:8000

// Quit the server with CONTROL-C.

[Thu Apr 19 09:15:18 2018] 127.0.0.1:52930 [200]: /
[Thu Apr 19 09:15:20 2018] 127.0.0.1:52931 [200]: /_wdt/511c4a