Skip to content

Commit

Permalink
cambios migra
Browse files Browse the repository at this point in the history
  • Loading branch information
gerMdz committed May 12, 2020
1 parent e2c251f commit a37b37c
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 39 deletions.
Binary file added assets/images/cabecera_index.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env php
<?php

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\ErrorHandler\Debug;

if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
}

set_time_limit(0);

require dirname(__DIR__).'/vendor/autoload.php';

if (!class_exists(Application::class)) {
throw new LogicException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}

$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}

if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

require dirname(__DIR__).'/config/bootstrap.php';

if ($_SERVER['APP_DEBUG']) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
13 changes: 13 additions & 0 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env php
<?php

if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
13 changes: 13 additions & 0 deletions src/DataFixtures/AppFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\DataFixtures;

use App\Entity\IndexAlameda;
use App\Entity\MetaBase;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;

Expand Down Expand Up @@ -32,7 +33,19 @@ private function creaDatosIndex(ObjectManager $manager){
$inicio->setVersiculo('2 Crónicas 20:12 (NVI)');
$inicio->setBase('index');

$base = new MetaBase();
$base->setBase('index') ;
$base->setLema('Oraciones Audaces');
$base->setLemaPrincipal('Vení tal como sos');
$base->setMetaAutor('Diseño Alameda');
$base->setMetaDescripcion('Jesús, Dios, Igelsia, Amor, Esperanza, Fe, Arte');
$base->setMetaTitle('Iglesia de la Alameda');
$base->setMetaType('website');
$base->setMetaUrl('https://iglesiaalameda.com');
$base->setSiteName('Iglesia Alameda');

$manager->persist($inicio);
$manager->persist($base);

$manager->flush();

Expand Down
4 changes: 2 additions & 2 deletions src/DataFixtures/UserFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function loadData(ObjectManager $manager)
$this->createMany(10, 'main_users', function ($i) use ($manager){

$user = new User();
$user->setEmail(sprintf('alameda%d@example.com', $i));
$user->setEmail(sprintf('alameda%d@alameda.com', $i));
$user->setPrimerNombre($this->faker->firstName);
$user->setPassword($this->userPasswordEncoder->encodePassword(
$user,
Expand All @@ -57,7 +57,7 @@ protected function loadData(ObjectManager $manager)
$this->createMany(3, 'admin_users', function ($i){

$user = new User();
$user->setEmail(sprintf('admin%d@example.com', $i));
$user->setEmail(sprintf('admin%d@alameda.com', $i));
$user->setPrimerNombre($this->faker->firstName);
if ($this->faker->boolean) {
$user->setTwitterUsername($this->faker->userName);
Expand Down
37 changes: 0 additions & 37 deletions src/Migrations/Version20200425110656.php

This file was deleted.

6 changes: 6 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
"laminas/laminas-code": {
"version": "3.4.1"
},
"laminas/laminas-eventmanager": {
"version": "3.2.1"
},
"laminas/laminas-zendframework-bridge": {
"version": "1.0.3"
},
Expand Down

0 comments on commit a37b37c

Please sign in to comment.