Skip to content
This repository was archived by the owner on May 8, 2018. It is now read-only.

Commit fbf849d

Browse files
committed
Dropping PHP 5.3 and 5.4 from Travis
1 parent 4d63611 commit fbf849d

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: php
22

33
php:
4-
- 5.3
5-
- 5.4
64
- 5.5
75
- 5.6
86
- hhvm

createLogo.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
require __DIR__ . '/boot.php';
3+
4+
use Lcobucci\DependencyInjection\XmlContainerBuilder;
5+
use Lcobucci\ActionMapper2\DependencyInjection\ContainerConfig;
6+
use PHPSC\Conference\Domain\Entity\Logo;
7+
8+
$config = require __DIR__ . '/config/di-container.php';
9+
10+
$builder = new XmlContainerBuilder(
11+
ContainerConfig::getClass($config),
12+
ContainerConfig::getDumpDir($config)
13+
);
14+
15+
$container = $builder->getContainer(
16+
$config->getFile(),
17+
array(),
18+
$config->getDefaultParameters()
19+
);
20+
21+
if (!isset($argv[1]) || !file_exists($argv[1])) {
22+
echo 'Valid image path must be informed' . PHP_EOL;
23+
exit(1);
24+
}
25+
26+
$logo = new Logo();
27+
$logo->setImage(fopen($argv[1], 'rb'));
28+
$logo->setCreatedAt(new \DateTime());
29+
30+
$em = $container->get('entityManager');
31+
32+
$em->persist($logo);
33+
$em->flush();

0 commit comments

Comments
 (0)