partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 0f5415fccd90e8e0033587b73a06deab4ed9abea
parent e76fc839e9503f379d232a31ece70fa1b74cac36
Author: dromer <1185977+dromer@users.noreply.github.com>
Date:   Thu, 13 Feb 2020 19:43:17 +0100

styleci fixes (#1062)

* styleci fixes

* more styleci fixes

* even more styleci fixes

* forgot to add files. it's late. I should go to bed

* try block-quote

* we don't need no stinking badges

* remove unused code

* don't enable explicitely

* don't disable explicitely

* remove import

* style changes

Diffstat:
M.styleci.yml | 2--
Mapp/PartKeeprRequirements.php | 28+++++++++++++++-------------
Msrc/PartKeepr/AuthBundle/Tests/LegacyAuthTest.php | 12++++++------
Msrc/PartKeepr/AuthBundle/Tests/UserTest.php | 12++++++------
Msrc/PartKeepr/CoreBundle/Command/FixTreeCommand.php | 4----
Msrc/PartKeepr/CoreBundle/Entity/BaseEntity.php | 2+-
Msrc/PartKeepr/CoreBundle/EventListener/RequestExceptionListener.php | 26+++-----------------------
Msrc/PartKeepr/CoreBundle/Services/SystemService.php | 5+++--
Msrc/PartKeepr/DoctrineReflectionBundle/Exception/EntityInUseException.php | 8+++-----
Msrc/PartKeepr/DoctrineReflectionBundle/Exception/ExceptionWrapperHandler.php | 4++--
Msrc/PartKeepr/DoctrineReflectionBundle/Services/DeletionService.php | 13+++++--------
Msrc/PartKeepr/FrontendBundle/Controller/IndexController.php | 6++++--
Msrc/PartKeepr/FrontendBundle/DependencyInjection/PartKeeprFrontendExtension.php | 4++--
Msrc/PartKeepr/FrontendBundle/Entity/GridPreset.php | 6+++---
Msrc/PartKeepr/FrontendBundle/Services/GridPresetService.php | 12++++++------
Msrc/PartKeepr/ImportBundle/Configuration/FieldConfiguration.php | 1+
Msrc/PartKeepr/ImportBundle/Configuration/ManyToOneConfiguration.php | 1+
Msrc/PartKeepr/MimetypeIconsBundle/Services/MimetypeIconService.php | 1+
Dsrc/PartKeepr/MobileFrontendBundle/DependencyInjection/PartKeeprFrontendExtension.php | 19-------------------
Asrc/PartKeepr/MobileFrontendBundle/DependencyInjection/PartKeeprMobileFrontendExtension.php | 19+++++++++++++++++++
Msrc/PartKeepr/ProjectBundle/Entity/ProjectPart.php | 4++--
Msrc/PartKeepr/ProjectBundle/Entity/ProjectRunPart.php | 2+-
Msrc/PartKeepr/ProjectBundle/Entity/ReportPart.php | 2+-
Msrc/PartKeepr/SetupBundle/Command/ImportUnitsCommand.php | 2+-
Msrc/PartKeepr/UploadedFileBundle/Controller/TemporaryFileController.php | 2+-
Msrc/PartKeepr/UploadedFileBundle/Services/UploadedFileService.php | 1+
26 files changed, 88 insertions(+), 110 deletions(-)

diff --git a/.styleci.yml b/.styleci.yml @@ -1,7 +1,5 @@ preset: recommended disabled: - - phpdoc_to_comment - single_quote - phpdoc_var_without_name - - simplified_null_return diff --git a/app/PartKeeprRequirements.php b/app/PartKeeprRequirements.php @@ -35,9 +35,9 @@ class PartKeeprRequirements extends SymfonyRequirements sprintf('The php.ini memory_limit directive must be set to 128MB or higher. Your limit is set to %s', ini_get('memory_limit'))); - $this->checkWritable(realpath(dirname(__FILE__) . '/../data/')); - $this->checkWritable(realpath(dirname(__FILE__) . '/../app/')); - $this->checkWritable(realpath(dirname(__FILE__) . '/../web/')); + $this->checkWritable(realpath(dirname(__FILE__).'/../data/')); + $this->checkWritable(realpath(dirname(__FILE__).'/../app/')); + $this->checkWritable(realpath(dirname(__FILE__).'/../web/')); $this->addRecommendation( function_exists('apc_fetch'), @@ -109,7 +109,7 @@ class PartKeeprRequirements extends SymfonyRequirements */ protected function getBytesIniSetting($setting) { - return (int)$this->returnBytes(ini_get($setting)); + return (int) $this->returnBytes(ini_get($setting)); } /** @@ -123,7 +123,7 @@ class PartKeeprRequirements extends SymfonyRequirements { $val = trim($val); $last = strtolower($val[strlen($val) - 1]); - $vali = (int)substr($val, 0, -1); + $vali = (int) substr($val, 0, -1); switch ($last) { // The 'G' modifier is available since PHP 5.1.0 case 'g': @@ -136,7 +136,7 @@ class PartKeeprRequirements extends SymfonyRequirements $vali *= 1024; break; default: - $vali = (int)$val; + $vali = (int) $val; } return $vali; @@ -154,24 +154,26 @@ class PartKeeprRequirements extends SymfonyRequirements protected function isWritableRecursive($dir) { if (!is_writable($dir)) { - throw new \Exception($dir . ' is not writable.'); + throw new \Exception($dir.' is not writable.'); } $folder = opendir($dir); while ($file = readdir($folder)) { if ($file != '.' && $file != '..') { - if (!is_writable($dir . '/' . $file)) { + if (!is_writable($dir.'/'.$file)) { closedir($folder); - throw new \Exception($dir . '/' . $file . ' is not writable.'); + + throw new \Exception($dir.'/'.$file.' is not writable.'); } else { // Skip hidden directories - if ((is_dir($dir . '/' . $file)) && ($file[0] == '.')) { + if ((is_dir($dir.'/'.$file)) && ($file[0] == '.')) { continue; } - if (is_dir($dir . '/' . $file)) { - if (!$this->isWritableRecursive($dir . '/' . $file)) { + if (is_dir($dir.'/'.$file)) { + if (!$this->isWritableRecursive($dir.'/'.$file)) { closedir($folder); - throw new \Exception($dir . '/' . $file . ' is not writable.'); + + throw new \Exception($dir.'/'.$file.'is not writable.'); } } } diff --git a/src/PartKeepr/AuthBundle/Tests/LegacyAuthTest.php b/src/PartKeepr/AuthBundle/Tests/LegacyAuthTest.php @@ -22,9 +22,9 @@ class LegacyAuthTest extends WebTestCase $this->getContainer()->get('doctrine.orm.default_entity_manager')->flush($user); $client = static::makeClient(false, [ - 'PHP_AUTH_USER' => 'foobar', - 'PHP_AUTH_PW' => 'admin', - ] + 'PHP_AUTH_USER' => 'foobar', + 'PHP_AUTH_PW' => 'admin', + ] ); $client->request('GET', '/api/system_status'); @@ -32,9 +32,9 @@ class LegacyAuthTest extends WebTestCase $this->assertEquals(200, $client->getResponse()->getStatusCode()); $client = static::makeClient(false, [ - 'PHP_AUTH_USER' => 'foobar', - 'PHP_AUTH_PW' => 'admin2', - ] + 'PHP_AUTH_USER' => 'foobar', + 'PHP_AUTH_PW' => 'admin2', + ] ); $client->request('GET', '/api/system_status'); diff --git a/src/PartKeepr/AuthBundle/Tests/UserTest.php b/src/PartKeepr/AuthBundle/Tests/UserTest.php @@ -95,9 +95,9 @@ class UserTest extends WebTestCase $this->getContainer()->get('doctrine.orm.default_entity_manager')->flush($user); $client = static::makeClient(false, [ - 'PHP_AUTH_USER' => 'bernd2', - 'PHP_AUTH_PW' => 'admin', - ] + 'PHP_AUTH_USER' => 'bernd2', + 'PHP_AUTH_PW' => 'admin', + ] ); $iriConverter = $this->getContainer()->get('api.iri_converter'); @@ -118,9 +118,9 @@ class UserTest extends WebTestCase $this->assertEmpty($response->{'newPassword'}); $client = static::makeClient(false, [ - 'PHP_AUTH_USER' => 'bernd2', - 'PHP_AUTH_PW' => 'foobar', - ] + 'PHP_AUTH_USER' => 'bernd2', + 'PHP_AUTH_PW' => 'foobar', + ] ); $client->request('PUT', $iri, $parameters); diff --git a/src/PartKeepr/CoreBundle/Command/FixTreeCommand.php b/src/PartKeepr/CoreBundle/Command/FixTreeCommand.php @@ -3,8 +3,6 @@ namespace PartKeepr\CoreBundle\Command; use Doctrine\ORM\EntityManager; -use Gedmo\Tree\Entity\Repository\NestedTreeRepository; -use PartKeepr\CategoryBundle\Entity\CategoryPathInterface; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -140,6 +138,4 @@ class FixTreeCommand extends ContainerAwareCommand return $this->entityManager->getConnection()->fetchAssoc($qb->getSQL(), [':nodeid' => $id])['level']; } - - } diff --git a/src/PartKeepr/CoreBundle/Entity/BaseEntity.php b/src/PartKeepr/CoreBundle/Entity/BaseEntity.php @@ -30,6 +30,6 @@ abstract class BaseEntity public function __toString() { - return get_class($this) . " #" . $this->getId(); + return get_class($this)." #".$this->getId(); } } diff --git a/src/PartKeepr/CoreBundle/EventListener/RequestExceptionListener.php b/src/PartKeepr/CoreBundle/EventListener/RequestExceptionListener.php @@ -3,12 +3,11 @@ * Created by PhpStorm. * User: felicitus * Date: 10/25/17 - * Time: 11:01 PM + * Time: 11:01 PM. */ namespace PartKeepr\CoreBundle\EventListener; -use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException; use Dunglas\ApiBundle\Action\ActionUtilTrait; use Dunglas\ApiBundle\Api\IriConverter; @@ -69,40 +68,21 @@ class RequestExceptionListener extends \Dunglas\ApiBundle\Hydra\EventListener\Re $headers = []; if ($exception instanceof ForeignKeyConstraintViolationException) { - $item = $this->iriConverter->getItemFromIri($request->getRequestUri()); $usedIn = $this->deletionService->findUndeletableUsages($item); - $data = new EntityInUseException((string)$item, $usedIn); + $data = new EntityInUseException((string) $item, $usedIn); $status = Response::HTTP_FAILED_DEPENDENCY; - $event->setResponse(new \Symfony\Component\HttpFoundation\Response( json_encode($data), $status, $headers - ));//list($resourceType) = $this->extractAttributes($request); - ; - - //$systemNotice = $this->getItem($this->dataProvider, $resourceType, $id); - /** - * @var $exception DBALException - */ - - /*$headers = $exception->getHeaders(); - $data = $exception; - - $event->setResponse(new Response( - $this->normalizer->normalize($data, 'hydra-error'), - $status, - $headers - ));*/ + )); } else { parent::onKernelException($event); } - - } } diff --git a/src/PartKeepr/CoreBundle/Services/SystemService.php b/src/PartKeepr/CoreBundle/Services/SystemService.php @@ -2,12 +2,12 @@ namespace PartKeepr\CoreBundle\Services; -use Guzzle\Http\Client; use Doctrine\Bundle\DoctrineBundle\Registry; use Doctrine\DBAL\Version as DBALVersion; use Doctrine\ORM\EntityManager; use Doctrine\ORM\Tools\SchemaTool; use Doctrine\ORM\Version as ORMVersion; +use Guzzle\Http\Client; use PartKeepr\CoreBundle\System\OperatingSystem; use PartKeepr\CoreBundle\System\SystemInformationRecord; use PartKeepr\CronLoggerBundle\Services\CronLoggerService; @@ -286,7 +286,8 @@ class SystemService extends ContainerAware } } - public function getPatreonStatus () { + public function getPatreonStatus() + { $statusURI = $this->container->getParameter("partkeepr.patreon.statusuri"); if ($statusURI === false) { diff --git a/src/PartKeepr/DoctrineReflectionBundle/Exception/EntityInUseException.php b/src/PartKeepr/DoctrineReflectionBundle/Exception/EntityInUseException.php @@ -3,12 +3,11 @@ * Created by PhpStorm. * User: felicitus * Date: 10/25/17 - * Time: 11:45 PM + * Time: 11:45 PM. */ namespace PartKeepr\DoctrineReflectionBundle\Exception; - use PartKeepr\CoreBundle\Exceptions\TranslatableException; class EntityInUseException extends TranslatableException @@ -29,6 +28,6 @@ class EntityInUseException extends TranslatableException public function getMessageKey() { - return sprintf('%s is in use by:', (string)$this->entityName); + return sprintf('%s is in use by:', (string) $this->entityName); } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/DoctrineReflectionBundle/Exception/ExceptionWrapperHandler.php b/src/PartKeepr/DoctrineReflectionBundle/Exception/ExceptionWrapperHandler.php @@ -15,8 +15,8 @@ class ExceptionWrapperHandler implements ExceptionWrapperHandlerInterface public function wrap($data) { $data = [ - '@type' => 'Error', - 'hydra:title' => isset($context['title']) ? $context['title'] : 'An error occurred', + '@type' => 'Error', + 'hydra:title' => isset($context['title']) ? $context['title'] : 'An error occurred', 'hydra:description' => $data['message'], ]; diff --git a/src/PartKeepr/DoctrineReflectionBundle/Services/DeletionService.php b/src/PartKeepr/DoctrineReflectionBundle/Services/DeletionService.php @@ -3,12 +3,11 @@ * Created by PhpStorm. * User: felicitus * Date: 10/25/17 - * Time: 5:38 PM + * Time: 5:38 PM. */ namespace PartKeepr\DoctrineReflectionBundle\Services; - use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping\ClassMetadata; @@ -19,13 +18,11 @@ class DeletionService */ private $em; - public function __construct(EntityManager $entityManager) { $this->em = $entityManager; } - public function findUndeletableUsages($entity) { $realClassName = $this->em->getClassMetadata(get_class($entity))->name; @@ -51,13 +48,13 @@ class DeletionService $qb = $this->em->createQueryBuilder(); $qb->select("q")->from($associationMapping["sourceEntity"], "q")->where( - $qb->expr()->eq("q." . $associationMapping["fieldName"], ":query") + $qb->expr()->eq("q.".$associationMapping["fieldName"], ":query") ); $qb->setParameter(":query", $entity); foreach ($qb->getQuery()->getResult() as $result) { - $usedIn[] = (string)$result; + $usedIn[] = (string) $result; } } } @@ -68,6 +65,7 @@ class DeletionService /** * @param $className + * * @return ClassMetadata|null */ protected function getAllMetadataInfoFor($className) @@ -85,4 +83,4 @@ class DeletionService return null; } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/FrontendBundle/Controller/IndexController.php b/src/PartKeepr/FrontendBundle/Controller/IndexController.php @@ -20,7 +20,8 @@ class IndexController extends Controller return $this->render('PartKeeprFrontendBundle::index.html.twig', $this->getRenderParameters()); } - public function getRenderParameters () { + public function getRenderParameters() + { if ($this->getParameter('partkeepr.maintenance') !== false) { $renderParams['maintenanceTitle'] = $this->getParameter('partkeepr.maintenance.title'); $renderParams['maintenanceMessage'] = $this->getParameter('partkeepr.maintenance.message'); @@ -86,7 +87,8 @@ class IndexController extends Controller * * @return string */ - public function getBaseURL () { + public function getBaseURL() + { $baseUrl = $this->getParameterWithDefault('partkeepr.frontend.base_url', false); if ($baseUrl !== false) { diff --git a/src/PartKeepr/FrontendBundle/DependencyInjection/PartKeeprFrontendExtension.php b/src/PartKeepr/FrontendBundle/DependencyInjection/PartKeeprFrontendExtension.php @@ -1,4 +1,5 @@ <?php + namespace PartKeepr\FrontendBundle\DependencyInjection; use Symfony\Component\Config\FileLocator; @@ -17,4 +18,4 @@ class PartKeeprFrontendExtension extends Extension $loader->load('services.xml'); $loader->load('actions.xml'); } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/FrontendBundle/Entity/GridPreset.php b/src/PartKeepr/FrontendBundle/Entity/GridPreset.php @@ -47,17 +47,17 @@ class GridPreset extends BaseEntity private $configuration; /** - * Defines if the selected grid preset is the default + * Defines if the selected grid preset is the default. * * @ORM\Column(type="boolean") * @Groups({"default"}) * - * @var boolean + * @var bool */ private $gridDefault = false; /** - * @return boolean True if the given preset is the default + * @return bool True if the given preset is the default */ public function isGridDefault() { diff --git a/src/PartKeepr/FrontendBundle/Services/GridPresetService.php b/src/PartKeepr/FrontendBundle/Services/GridPresetService.php @@ -2,7 +2,6 @@ namespace PartKeepr\FrontendBundle\Services; - use Doctrine\ORM\EntityManager; use PartKeepr\FrontendBundle\Entity\GridPreset; @@ -18,10 +17,10 @@ class GridPresetService $this->entityManager = $entityManager; } - public function markGridPresetAsDefault (GridPreset $gridPreset) { + public function markGridPresetAsDefault(GridPreset $gridPreset) + { $queryBuilder = $this->entityManager->createQueryBuilder(); - $queryBuilder->update("PartKeeprFrontendBundle:GridPreset", "gp")->set("gp.gridDefault", ":default") ->where("gp.grid = :grid"); @@ -33,11 +32,13 @@ class GridPresetService $gridPreset->setGridDefault(true); } - public function getDefaultPresets () { + public function getDefaultPresets() + { $queryBuilder = $this->entityManager->createQueryBuilder(); $queryBuilder->select("gp.grid", "gp.configuration")->from("PartKeeprFrontendBundle:GridPreset", "gp")->where("gp.gridDefault = :default"); $queryBuilder->setParameter("default", true); + return $queryBuilder->getQuery()->getArrayResult(); } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/ImportBundle/Configuration/FieldConfiguration.php b/src/PartKeepr/ImportBundle/Configuration/FieldConfiguration.php @@ -39,6 +39,7 @@ class FieldConfiguration extends BaseConfiguration { if (!property_exists($configuration, "fieldConfiguration")) { return false; + throw new \Exception("The key fieldConfiguration does not exist!"); } diff --git a/src/PartKeepr/ImportBundle/Configuration/ManyToOneConfiguration.php b/src/PartKeepr/ImportBundle/Configuration/ManyToOneConfiguration.php @@ -49,6 +49,7 @@ class ManyToOneConfiguration extends Configuration { if (!property_exists($importConfiguration, "importBehaviour")) { return false; + throw new \Exception("The key importBehaviour does not exist!"); } diff --git a/src/PartKeepr/MimetypeIconsBundle/Services/MimetypeIconService.php b/src/PartKeepr/MimetypeIconsBundle/Services/MimetypeIconService.php @@ -32,6 +32,7 @@ class MimetypeIconService extends ContainerAware $iconDirectory = $this->container->getParameter('partkeepr.directories.mimetype_icons'); $fileLocator = new FileLocator($iconDirectory); + try { $iconFile = $fileLocator->locate($file); } catch (\InvalidArgumentException $e) { diff --git a/src/PartKeepr/MobileFrontendBundle/DependencyInjection/PartKeeprFrontendExtension.php b/src/PartKeepr/MobileFrontendBundle/DependencyInjection/PartKeeprFrontendExtension.php @@ -1,18 +0,0 @@ -<?php -namespace PartKeepr\MobileFrontendBundle\DependencyInjection; - -use Symfony\Component\Config\FileLocator; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; - -class PartKeeprMobileFrontendExtension extends Extension -{ - /** - * {@inheritdoc} - */ - public function load(array $configs, ContainerBuilder $container) - { - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); - } -}- \ No newline at end of file diff --git a/src/PartKeepr/MobileFrontendBundle/DependencyInjection/PartKeeprMobileFrontendExtension.php b/src/PartKeepr/MobileFrontendBundle/DependencyInjection/PartKeeprMobileFrontendExtension.php @@ -0,0 +1,19 @@ +<?php + +namespace PartKeepr\MobileFrontendBundle\DependencyInjection; + +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; + +class PartKeeprMobileFrontendExtension extends Extension +{ + /** + * {@inheritdoc} + */ + public function load(array $configs, ContainerBuilder $container) + { + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + } +} diff --git a/src/PartKeepr/ProjectBundle/Entity/ProjectPart.php b/src/PartKeepr/ProjectBundle/Entity/ProjectPart.php @@ -115,7 +115,7 @@ class ProjectPart extends BaseEntity { switch ($this->getOverageType()) { case self::OVERAGE_TYPE_PERCENT: - return (int)$this->getQuantity() * (1 + $this->getOverage() / 100); + return (int) $this->getQuantity() * (1 + $this->getOverage() / 100); case self::OVERAGE_TYPE_ABSOLUTE: return $this->getQuantity() + $this->getOverage(); default: @@ -269,6 +269,6 @@ class ProjectPart extends BaseEntity public function __toString() { //@todo i18n - return sprintf("Used in project %s", $this->getProject()->getName()) . " / " . parent::__toString(); + return sprintf("Used in project %s", $this->getProject()->getName())." / ".parent::__toString(); } } diff --git a/src/PartKeepr/ProjectBundle/Entity/ProjectRunPart.php b/src/PartKeepr/ProjectBundle/Entity/ProjectRunPart.php @@ -123,6 +123,6 @@ class ProjectRunPart extends BaseEntity // @todo i18n return sprintf("Used in project run for project %s on %s", $this->getProjectRun()->getProject()->getName(), - $this->getProjectRun()->getRunDateTime()->format("Y-m-d H:i:s")) . " / " . parent::__toString(); + $this->getProjectRun()->getRunDateTime()->format("Y-m-d H:i:s"))." / ".parent::__toString(); } } diff --git a/src/PartKeepr/ProjectBundle/Entity/ReportPart.php b/src/PartKeepr/ProjectBundle/Entity/ReportPart.php @@ -341,6 +341,6 @@ class ReportPart extends BaseEntity { // @todo i18n return sprintf("Used in project report %s %s", $this->getReport()->getName(), - $this->getReport()->getCreateDateTime()->format("Y-m-d H:i:s")) . " / " . parent::__toString(); + $this->getReport()->getCreateDateTime()->format("Y-m-d H:i:s"))." / ".parent::__toString(); } } diff --git a/src/PartKeepr/SetupBundle/Command/ImportUnitsCommand.php b/src/PartKeepr/SetupBundle/Command/ImportUnitsCommand.php @@ -14,7 +14,7 @@ class ImportUnitsCommand extends ContainerAwareCommand parent::configure(); $this->setName('partkeepr:setup:import-units'); $this->setDescription('Imports the default PartKeepr units'); - $this->addOption("update", null, InputOption::VALUE_NONE, "Updates existing units" ); + $this->addOption("update", null, InputOption::VALUE_NONE, "Updates existing units"); } public function execute(InputInterface $input, OutputInterface $output) diff --git a/src/PartKeepr/UploadedFileBundle/Controller/TemporaryFileController.php b/src/PartKeepr/UploadedFileBundle/Controller/TemporaryFileController.php @@ -62,7 +62,7 @@ class TemporaryFileController extends FileController throw new \Exception($this->get('translator')->trans('The uploaded file is too large.')); } - /* + /** * @var $file UploadedFile */ $fileService->replace($uploadedFile, new File($file->getPathname())); diff --git a/src/PartKeepr/UploadedFileBundle/Services/UploadedFileService.php b/src/PartKeepr/UploadedFileBundle/Services/UploadedFileService.php @@ -142,6 +142,7 @@ class UploadedFileService extends ContainerAware // Strip ANY tags from the error message. curl tends to spit out <url> is not valid, which then // confuses the error message parser on the client side. $curlError = str_replace(['>', '<'], '', $curlError); + throw new \Exception('replaceFromURL error: '.$curlError); }