upgrade symfony
This commit is contained in:
+33
-32
@@ -12,43 +12,43 @@
|
|||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-libxml": "*",
|
"ext-libxml": "*",
|
||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"doctrine/annotations": "^1.0",
|
"doctrine/deprecations": "*",
|
||||||
"doctrine/doctrine-bundle": "^2.5",
|
"doctrine/doctrine-bundle": "^2.10",
|
||||||
"doctrine/doctrine-migrations-bundle": "^3.2",
|
"doctrine/doctrine-migrations-bundle": "^3.2",
|
||||||
"doctrine/orm": "^2.11",
|
"doctrine/orm": "^2.20",
|
||||||
"phpdocumentor/reflection-docblock": "^5.3",
|
"phpdocumentor/reflection-docblock": "^5.3",
|
||||||
"phpoffice/phpspreadsheet": "^1.22",
|
"phpoffice/phpspreadsheet": "^1.22",
|
||||||
"phpstan/phpdoc-parser": "^1.2",
|
"phpstan/phpdoc-parser": "^1.2",
|
||||||
"sensio/framework-extra-bundle": "^6.1",
|
"sensio/framework-extra-bundle": "^6.1",
|
||||||
"symfony/asset": "5.4.*",
|
"symfony/asset": "6.4.*",
|
||||||
"symfony/console": "5.4.*",
|
"symfony/console": "6.4.*",
|
||||||
"symfony/doctrine-messenger": "5.4.*",
|
"symfony/doctrine-messenger": "6.4.*",
|
||||||
"symfony/dotenv": "5.4.*",
|
"symfony/dotenv": "6.4.*",
|
||||||
"symfony/expression-language": "5.4.*",
|
"symfony/expression-language": "6.4.*",
|
||||||
"symfony/flex": "^1.21",
|
"symfony/flex": "^1.21",
|
||||||
"symfony/form": "5.4.*",
|
"symfony/form": "6.4.*",
|
||||||
"symfony/framework-bundle": "5.4.*",
|
"symfony/framework-bundle": "6.4.*",
|
||||||
"symfony/http-client": "5.4.*",
|
"symfony/http-client": "6.4.*",
|
||||||
"symfony/intl": "5.4.*",
|
"symfony/intl": "6.4.*",
|
||||||
"symfony/mailer": "5.4.*",
|
"symfony/mailer": "6.4.*",
|
||||||
"symfony/mime": "5.4.*",
|
"symfony/mime": "6.4.*",
|
||||||
"symfony/monolog-bundle": "^3.0",
|
"symfony/monolog-bundle": "^3.0",
|
||||||
"symfony/notifier": "5.4.*",
|
"symfony/notifier": "6.4.*",
|
||||||
"symfony/process": "5.4.*",
|
"symfony/process": "6.4.*",
|
||||||
"symfony/property-access": "5.4.*",
|
"symfony/property-access": "6.4.*",
|
||||||
"symfony/property-info": "5.4.*",
|
"symfony/property-info": "6.4.*",
|
||||||
"symfony/proxy-manager-bridge": "5.4.*",
|
"symfony/proxy-manager-bridge": "6.4.*",
|
||||||
"symfony/runtime": "5.4.*",
|
"symfony/runtime": "6.4.*",
|
||||||
"symfony/security-bundle": "5.4.*",
|
"symfony/security-bundle": "6.4.*",
|
||||||
"symfony/serializer": "5.4.*",
|
"symfony/serializer": "6.4.*",
|
||||||
"symfony/string": "5.4.*",
|
"symfony/string": "6.4.*",
|
||||||
"symfony/translation": "5.4.*",
|
"symfony/translation": "6.4.*",
|
||||||
"symfony/twig-bundle": "5.4.*",
|
"symfony/twig-bundle": "6.4.*",
|
||||||
"symfony/validator": "5.4.*",
|
"symfony/validator": "6.4.*",
|
||||||
"symfony/web-link": "5.4.*",
|
"symfony/web-link": "6.4.*",
|
||||||
"symfony/webapp-meta": "^1.0",
|
"symfony/webapp-meta": "^1.0",
|
||||||
"symfony/webpack-encore-bundle": "^1.14",
|
"symfony/webpack-encore-bundle": "^1.14",
|
||||||
"symfony/yaml": "5.4.*",
|
"symfony/yaml": "6.4.*",
|
||||||
"twig/extra-bundle": "^2.12|^3.0",
|
"twig/extra-bundle": "^2.12|^3.0",
|
||||||
"twig/twig": "^2.12|^3.0"
|
"twig/twig": "^2.12|^3.0"
|
||||||
},
|
},
|
||||||
@@ -97,13 +97,14 @@
|
|||||||
"extra": {
|
"extra": {
|
||||||
"symfony": {
|
"symfony": {
|
||||||
"allow-contrib": false,
|
"allow-contrib": false,
|
||||||
"require": "5.4.*"
|
"require": "6.4.*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/debug-bundle": "5.4.*",
|
"rector/rector": "*",
|
||||||
|
"symfony/debug-bundle": "6.4.*",
|
||||||
"symfony/maker-bundle": "^1.0",
|
"symfony/maker-bundle": "^1.0",
|
||||||
"symfony/stopwatch": "5.4.*",
|
"symfony/stopwatch": "6.4.*",
|
||||||
"symfony/web-profiler-bundle": "5.4.*"
|
"symfony/web-profiler-bundle": "6.4.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+2566
-2479
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@ doctrine:
|
|||||||
dir: '%kernel.project_dir%/src/Entity'
|
dir: '%kernel.project_dir%/src/Entity'
|
||||||
prefix: 'App\Entity'
|
prefix: 'App\Entity'
|
||||||
alias: App
|
alias: App
|
||||||
|
type: attribute
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
doctrine:
|
doctrine:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
framework:
|
framework:
|
||||||
messenger:
|
messenger:
|
||||||
|
reset_on_message: true
|
||||||
failure_transport: failed
|
failure_transport: failed
|
||||||
|
|
||||||
transports:
|
transports:
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||||||
|
|
||||||
class IndexController extends AbstractController
|
class IndexController extends AbstractController
|
||||||
{
|
{
|
||||||
/**
|
#[Route(path: '/', name: 'homepage')]
|
||||||
* @Route("/", name="homepage")
|
|
||||||
*/
|
|
||||||
public function index() : Response
|
public function index() : Response
|
||||||
{
|
{
|
||||||
return $this->render("index/index.html.twig");
|
return $this->render("index/index.html.twig");
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ use Symfony\Component\Validator\Constraints\File;
|
|||||||
|
|
||||||
class TaxesController extends AbstractController
|
class TaxesController extends AbstractController
|
||||||
{
|
{
|
||||||
/**
|
#[Route(path: '/taxes/{type}', name: 'app_taxes')]
|
||||||
* @Route("/taxes/{type}", name="app_taxes")
|
|
||||||
*/
|
|
||||||
public function index(Request $request, string $type): Response
|
public function index(Request $request, string $type): Response
|
||||||
{
|
{
|
||||||
if (!in_array($type, ["crypto", "dividend"])) {
|
if (!in_array($type, ["crypto", "dividend"])) {
|
||||||
@@ -63,7 +61,7 @@ class TaxesController extends AbstractController
|
|||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
if ($form->isSubmitted() && $form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
$files = $form->get('uploads')->getData();
|
$files = $form->get('uploads')->getData();
|
||||||
$hash = substr(md5(rand()),0,16);
|
$hash = substr(md5(random_int(0, mt_getrandmax())),0,16);
|
||||||
if ($files) {
|
if ($files) {
|
||||||
$i=1;
|
$i=1;
|
||||||
/** @var UploadedFile $file */
|
/** @var UploadedFile $file */
|
||||||
@@ -90,9 +88,7 @@ class TaxesController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[Route(path: '/taxes/dividend/{hash}', name: 'app_taxes_dividend_show')]
|
||||||
* @Route("/taxes/dividend/{hash}", name="app_taxes_dividend_show")
|
|
||||||
*/
|
|
||||||
public function showDividend(DividendsService $tax) : Response
|
public function showDividend(DividendsService $tax) : Response
|
||||||
{
|
{
|
||||||
if ($tax->readFiles()) {
|
if ($tax->readFiles()) {
|
||||||
@@ -109,9 +105,7 @@ class TaxesController extends AbstractController
|
|||||||
}
|
}
|
||||||
return new Response("error");
|
return new Response("error");
|
||||||
}
|
}
|
||||||
/**
|
#[Route(path: '/taxes/crypto/{hash}', name: 'app_taxes_crypto_show')]
|
||||||
* @Route("/taxes/crypto/{hash}", name="app_taxes_crypto_show")
|
|
||||||
*/
|
|
||||||
public function showCrypto(CryptoService $tax) : Response
|
public function showCrypto(CryptoService $tax) : Response
|
||||||
{
|
{
|
||||||
if ($tax->readFiles()) {
|
if ($tax->readFiles()) {
|
||||||
|
|||||||
@@ -6,32 +6,23 @@ use App\Repository\ExchangeRatesRepository;
|
|||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Doctrine\ORM\Mapping\Index;
|
use Doctrine\ORM\Mapping\Index;
|
||||||
|
|
||||||
/**
|
#[ORM\Table]
|
||||||
* @ORM\Entity(repositoryClass=ExchangeRatesRepository::class)
|
#[Index(columns: ['date_date', 'str_currency'], name: 'currency')]
|
||||||
* @ORM\Table(indexes={@Index(name="currency", columns={"date_date","str_currency"})})
|
#[ORM\Entity(repositoryClass: ExchangeRatesRepository::class)]
|
||||||
*/
|
|
||||||
class ExchangeRates
|
class ExchangeRates
|
||||||
{
|
{
|
||||||
/**
|
#[ORM\Id]
|
||||||
* @ORM\Id
|
#[ORM\GeneratedValue]
|
||||||
* @ORM\GeneratedValue
|
#[ORM\Column(type: 'integer')]
|
||||||
* @ORM\Column(type="integer")
|
|
||||||
*/
|
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'string', length: 3)]
|
||||||
* @ORM\Column(type="string", length=3)
|
|
||||||
*/
|
|
||||||
private $strCurrency;
|
private $strCurrency;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'float')]
|
||||||
* @ORM\Column(type="float")
|
|
||||||
*/
|
|
||||||
private $intRate;
|
private $intRate;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'date')]
|
||||||
* @ORM\Column(type="date")
|
|
||||||
*/
|
|
||||||
private $dateDate;
|
private $dateDate;
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
|||||||
@@ -10,12 +10,10 @@ class Currency
|
|||||||
public static array $currencies = ["USD","GBP","PLN","EUR","CAD","AUD"];
|
public static array $currencies = ["USD","GBP","PLN","EUR","CAD","AUD"];
|
||||||
public static array $currenciesCrypto = ["USDT"];
|
public static array $currenciesCrypto = ["USDT"];
|
||||||
private static string $apiUrl = "https://api.nbp.pl/api/exchangerates/rates/a/:code/:date/?format=json";
|
private static string $apiUrl = "https://api.nbp.pl/api/exchangerates/rates/a/:code/:date/?format=json";
|
||||||
private EntityManager $manager;
|
|
||||||
private array $ratesPerDate;
|
private array $ratesPerDate;
|
||||||
|
|
||||||
public function __construct(EntityManager $manager)
|
public function __construct(private readonly EntityManager $manager)
|
||||||
{
|
{
|
||||||
$this->manager = $manager;
|
|
||||||
$this->takeRates();
|
$this->takeRates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ final class CryptoValues
|
|||||||
}
|
}
|
||||||
$ret = false;
|
$ret = false;
|
||||||
foreach (self::$values[$type] as $value) {
|
foreach (self::$values[$type] as $value) {
|
||||||
if (strpos($text,$value) !== false) {
|
if (str_contains($text,(string) $value)) {
|
||||||
$ret = true;
|
$ret = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class DividendValues
|
|||||||
$val = trim($val);
|
$val = trim($val);
|
||||||
foreach (self::$samples as $key => $sample) {
|
foreach (self::$samples as $key => $sample) {
|
||||||
foreach ($sample as $item) {
|
foreach ($sample as $item) {
|
||||||
if (strpos($val, $item) !== false) {
|
if (str_contains($val, (string) $item)) {
|
||||||
$ret = $key;
|
$ret = $key;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class NeedFileName
|
|||||||
$name = null;
|
$name = null;
|
||||||
$fileName = strtolower($fileName);
|
$fileName = strtolower($fileName);
|
||||||
foreach (self::NAMES as $str) {
|
foreach (self::NAMES as $str) {
|
||||||
if (strpos($fileName, $str) !== false) {
|
if (str_contains($fileName, $str)) {
|
||||||
$name = $str;
|
$name = $str;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class Main
|
|||||||
}
|
}
|
||||||
if ($name === "setValue") {
|
if ($name === "setValue") {
|
||||||
$data = "$datum[$key]";
|
$data = "$datum[$key]";
|
||||||
if (strpos($data,",") !== false || strpos($data,".") !== false) {
|
if (str_contains($data,",") || str_contains($data,".")) {
|
||||||
$data = str_replace(",",".",$data);
|
$data = str_replace(",",".",$data);
|
||||||
}
|
}
|
||||||
$realInt = floatval($data)*MainObject::_CRYPTO_DIVIDER;
|
$realInt = floatval($data)*MainObject::_CRYPTO_DIVIDER;
|
||||||
@@ -89,7 +89,7 @@ class Main
|
|||||||
}
|
}
|
||||||
if ($name === "setPrice" && is_string($datum[$key])) {
|
if ($name === "setPrice" && is_string($datum[$key])) {
|
||||||
$val = $datum[$key];
|
$val = $datum[$key];
|
||||||
if (strpos($val, ".") !== false && strpos($val, ",") !== false) {
|
if (str_contains($val, ".") && str_contains($val, ",")) {
|
||||||
$val = str_replace(",", "", $val);
|
$val = str_replace(",", "", $val);
|
||||||
$datum[$key] = intval(floatval($val)*100);
|
$datum[$key] = intval(floatval($val)*100);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class DividendsSummary
|
|||||||
private array $sheetData=[];
|
private array $sheetData=[];
|
||||||
/** @var XMLReader|array $sheetData */
|
/** @var XMLReader|array $sheetData */
|
||||||
private array $xmlData=[];
|
private array $xmlData=[];
|
||||||
private Currency $currencyObj;
|
private readonly Currency $currencyObj;
|
||||||
/** @var array|DividendsData $error */
|
/** @var array|DividendsData $error */
|
||||||
private ?array $errorDividend=null;
|
private ?array $errorDividend=null;
|
||||||
private ?array $errorString=null;
|
private ?array $errorString=null;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class ExanteSheet extends SheetDataAll
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach ($rawDatum as $key => $value) {
|
foreach ($rawDatum as $key => $value) {
|
||||||
$value = strtolower($value);
|
$value = strtolower((string) $value);
|
||||||
if (str_contains($value, "comment")) {
|
if (str_contains($value, "comment")) {
|
||||||
$commentKey = $key;
|
$commentKey = $key;
|
||||||
}
|
}
|
||||||
@@ -28,15 +28,15 @@ class ExanteSheet extends SheetDataAll
|
|||||||
if ($index<2) {
|
if ($index<2) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$operationType = strtolower($rawDatum[$operationKey]);
|
$operationType = strtolower((string) $rawDatum[$operationKey]);
|
||||||
if (!str_contains($operationType,"dividend")) {
|
if (!str_contains($operationType,"dividend")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$comment = $rawDatum[$commentKey];
|
$comment = $rawDatum[$commentKey];
|
||||||
if (!str_contains($comment, "dividend")) {
|
if (!str_contains((string) $comment, "dividend")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$separate = explode(" ",$comment);
|
$separate = explode(" ",(string) $comment);
|
||||||
$tax = intval(str_replace(["(","-","%",")"],"",$separate[16]));
|
$tax = intval(str_replace(["(","-","%",")"],"",$separate[16]));
|
||||||
$value = floatval(str_replace(["(",")"],"",$separate[10]));
|
$value = floatval(str_replace(["(",")"],"",$separate[10]));
|
||||||
$date = new \DateTime($separate[3]);
|
$date = new \DateTime($separate[3]);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class IbkrSheet extends SheetDataAll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$test[$row['groupId']][] = $row['amount'];
|
$test[$row['groupId']][] = $row['amount'];
|
||||||
if (str_contains($row['type'], "Dividend")) {
|
if (str_contains((string) $row['type'], "Dividend")) {
|
||||||
$dividendArr[$row['groupId']] = $row;
|
$dividendArr[$row['groupId']] = $row;
|
||||||
} else {
|
} else {
|
||||||
if (!isset($taxArr[$row['groupId']])) {
|
if (!isset($taxArr[$row['groupId']])) {
|
||||||
@@ -61,7 +61,7 @@ class IbkrSheet extends SheetDataAll
|
|||||||
$taxPercentage = 19;
|
$taxPercentage = 19;
|
||||||
}
|
}
|
||||||
|
|
||||||
$separate = explode(" ", $dividend['description']);
|
$separate = explode(" ", (string) $dividend['description']);
|
||||||
$perShare = floatval($separate[4]);
|
$perShare = floatval($separate[4]);
|
||||||
if (!$perShare) {
|
if (!$perShare) {
|
||||||
$perShare = floatval($separate[5]);
|
$perShare = floatval($separate[5]);
|
||||||
@@ -69,7 +69,7 @@ class IbkrSheet extends SheetDataAll
|
|||||||
if (!$perShare) {
|
if (!$perShare) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$date = explode(";", $dividend['date'])[0];
|
$date = explode(";", (string) $dividend['date'])[0];
|
||||||
if (substr_count($date, "-") !== 2) {
|
if (substr_count($date, "-") !== 2) {
|
||||||
$date = substr($date, 0, 4) . "-" . substr($date, 4, 2) . "-" . substr($date, 6, 2);
|
$date = substr($date, 0, 4) . "-" . substr($date, 4, 2) . "-" . substr($date, 6, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class SheetData extends SheetDataAll
|
|||||||
$count++;
|
$count++;
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
if (in_array(mb_substr($data, 0, 2), ['CA', 'US', 'IE', 'GB']) && intval(mb_substr($data, 2, 1))>0) {
|
if (in_array(mb_substr((string) $data, 0, 2), ['CA', 'US', 'IE', 'GB']) && intval(mb_substr((string) $data, 2, 1))>0) {
|
||||||
$count = &$setDatas['data'];
|
$count = &$setDatas['data'];
|
||||||
$ret = "isin";
|
$ret = "isin";
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
@@ -106,7 +106,7 @@ class SheetData extends SheetDataAll
|
|||||||
if (in_array($data, Currency::$currencies)) {
|
if (in_array($data, Currency::$currencies)) {
|
||||||
return "currency";
|
return "currency";
|
||||||
}
|
}
|
||||||
if (count(explode(".", $data)) === 3 || count(explode("-", $data)) === 3) {
|
if (count(explode(".", (string) $data)) === 3 || count(explode("-", (string) $data)) === 3) {
|
||||||
return "date";
|
return "date";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ class SheetData extends SheetDataAll
|
|||||||
$ret = -1;
|
$ret = -1;
|
||||||
|
|
||||||
foreach ($this->takeColumnNames() as $index => $takeColumnName) {
|
foreach ($this->takeColumnNames() as $index => $takeColumnName) {
|
||||||
if (strpos($takeColumnName,"DATE") !== false || strpos($takeColumnName,"DATA") !== false) {
|
if (str_contains((string) $takeColumnName,"DATE") || str_contains((string) $takeColumnName,"DATA")) {
|
||||||
$ret = $index;
|
$ret = $index;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,16 +12,14 @@ abstract class SheetDataAll
|
|||||||
*/
|
*/
|
||||||
protected array $data = [];
|
protected array $data = [];
|
||||||
protected array $dataNotCalculate = [];
|
protected array $dataNotCalculate = [];
|
||||||
private array $rawData;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign raw data to field, then create array of DividendsData
|
* Assign raw data to field, then create array of DividendsData
|
||||||
*
|
*
|
||||||
* @param array $rawData
|
* @param array $rawData
|
||||||
*/
|
*/
|
||||||
public function __construct(array $rawData)
|
public function __construct(private readonly array $rawData)
|
||||||
{
|
{
|
||||||
$this->rawData = $rawData;
|
|
||||||
$this->countData = count($this->rawData) - 1;
|
$this->countData = count($this->rawData) - 1;
|
||||||
$this->data = $this->takeData();
|
$this->data = $this->takeData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class XMLReader
|
|||||||
$obj->setCurrency($value);
|
$obj->setCurrency($value);
|
||||||
}
|
}
|
||||||
if ($key === "payDate") {
|
if ($key === "payDate") {
|
||||||
$tmp = str_split($value, 4);
|
$tmp = str_split((string) $value, 4);
|
||||||
$y=$tmp[0];
|
$y=$tmp[0];
|
||||||
$tmp = str_split($tmp[1],2);
|
$tmp = str_split($tmp[1],2);
|
||||||
$d = $tmp[1];
|
$d = $tmp[1];
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class DividendsService extends MasterServices
|
|||||||
$summaryObj = new DividendsSummary($this->manager);
|
$summaryObj = new DividendsSummary($this->manager);
|
||||||
|
|
||||||
foreach ($this->allFiles as $file) {
|
foreach ($this->allFiles as $file) {
|
||||||
$extension = pathinfo($file)['extension'];
|
$extension = pathinfo((string) $file)['extension'];
|
||||||
$market = MarketNames::tryFromCase($file);
|
$market = MarketNames::tryFromCase($file);
|
||||||
|
|
||||||
if (in_array($extension, ['xlsx','csv'])) {
|
if (in_array($extension, ['xlsx','csv'])) {
|
||||||
|
|||||||
@@ -6,15 +6,11 @@ use Doctrine\ORM\EntityManager;
|
|||||||
|
|
||||||
class MasterServices
|
class MasterServices
|
||||||
{
|
{
|
||||||
protected EntityManager $manager;
|
|
||||||
protected string $hashParam;
|
|
||||||
protected string $uploadPath;
|
protected string $uploadPath;
|
||||||
protected array $allFiles;
|
protected array $allFiles;
|
||||||
|
|
||||||
public function __construct(EntityManager $entity,string $hash)
|
public function __construct(protected EntityManager $manager, protected string $hashParam)
|
||||||
{
|
{
|
||||||
$this->manager = $entity;
|
|
||||||
$this->hashParam = $hash;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUploadsPath(string $path)
|
public function setUploadsPath(string $path)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class AppExtension extends AbstractExtension
|
|||||||
public function getFilters(): array
|
public function getFilters(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new TwigFilter("price", [$this, 'formatPrice'])
|
new TwigFilter("price", $this->formatPrice(...))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-27
@@ -14,12 +14,6 @@
|
|||||||
"doctrine/cache": {
|
"doctrine/cache": {
|
||||||
"version": "2.1.1"
|
"version": "2.1.1"
|
||||||
},
|
},
|
||||||
"doctrine/collections": {
|
|
||||||
"version": "1.6.8"
|
|
||||||
},
|
|
||||||
"doctrine/common": {
|
|
||||||
"version": "3.2.2"
|
|
||||||
},
|
|
||||||
"doctrine/dbal": {
|
"doctrine/dbal": {
|
||||||
"version": "3.3.2"
|
"version": "3.3.2"
|
||||||
},
|
},
|
||||||
@@ -59,18 +53,12 @@
|
|||||||
"doctrine/inflector": {
|
"doctrine/inflector": {
|
||||||
"version": "2.0.4"
|
"version": "2.0.4"
|
||||||
},
|
},
|
||||||
"doctrine/instantiator": {
|
|
||||||
"version": "1.4.0"
|
|
||||||
},
|
|
||||||
"doctrine/lexer": {
|
"doctrine/lexer": {
|
||||||
"version": "1.2.3"
|
"version": "1.2.3"
|
||||||
},
|
},
|
||||||
"doctrine/migrations": {
|
"doctrine/migrations": {
|
||||||
"version": "3.4.1"
|
"version": "3.4.1"
|
||||||
},
|
},
|
||||||
"doctrine/orm": {
|
|
||||||
"version": "2.11.1"
|
|
||||||
},
|
|
||||||
"doctrine/persistence": {
|
"doctrine/persistence": {
|
||||||
"version": "2.3.0"
|
"version": "2.3.0"
|
||||||
},
|
},
|
||||||
@@ -122,6 +110,15 @@
|
|||||||
"phpstan/phpdoc-parser": {
|
"phpstan/phpdoc-parser": {
|
||||||
"version": "1.2.0"
|
"version": "1.2.0"
|
||||||
},
|
},
|
||||||
|
"phpstan/phpstan": {
|
||||||
|
"version": "2.1",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes-contrib",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "1.0",
|
||||||
|
"ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767"
|
||||||
|
}
|
||||||
|
},
|
||||||
"psr/cache": {
|
"psr/cache": {
|
||||||
"version": "1.0.1"
|
"version": "1.0.1"
|
||||||
},
|
},
|
||||||
@@ -161,9 +158,6 @@
|
|||||||
"config/packages/sensio_framework_extra.yaml"
|
"config/packages/sensio_framework_extra.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/amqp-messenger": {
|
|
||||||
"version": "v5.4.5"
|
|
||||||
},
|
|
||||||
"symfony/asset": {
|
"symfony/asset": {
|
||||||
"version": "v5.4.3"
|
"version": "v5.4.3"
|
||||||
},
|
},
|
||||||
@@ -366,15 +360,9 @@
|
|||||||
"symfony/polyfill-mbstring": {
|
"symfony/polyfill-mbstring": {
|
||||||
"version": "v1.24.0"
|
"version": "v1.24.0"
|
||||||
},
|
},
|
||||||
"symfony/polyfill-php73": {
|
|
||||||
"version": "v1.24.0"
|
|
||||||
},
|
|
||||||
"symfony/polyfill-php80": {
|
"symfony/polyfill-php80": {
|
||||||
"version": "v1.24.0"
|
"version": "v1.24.0"
|
||||||
},
|
},
|
||||||
"symfony/polyfill-php81": {
|
|
||||||
"version": "v1.24.0"
|
|
||||||
},
|
|
||||||
"symfony/process": {
|
"symfony/process": {
|
||||||
"version": "v5.4.5"
|
"version": "v5.4.5"
|
||||||
},
|
},
|
||||||
@@ -387,9 +375,6 @@
|
|||||||
"symfony/proxy-manager-bridge": {
|
"symfony/proxy-manager-bridge": {
|
||||||
"version": "v5.4.3"
|
"version": "v5.4.3"
|
||||||
},
|
},
|
||||||
"symfony/redis-messenger": {
|
|
||||||
"version": "v5.4.5"
|
|
||||||
},
|
|
||||||
"symfony/routing": {
|
"symfony/routing": {
|
||||||
"version": "5.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
@@ -424,9 +409,6 @@
|
|||||||
"symfony/security-csrf": {
|
"symfony/security-csrf": {
|
||||||
"version": "v5.4.3"
|
"version": "v5.4.3"
|
||||||
},
|
},
|
||||||
"symfony/security-guard": {
|
|
||||||
"version": "v5.4.3"
|
|
||||||
},
|
|
||||||
"symfony/security-http": {
|
"symfony/security-http": {
|
||||||
"version": "v5.4.5"
|
"version": "v5.4.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,9 +5,31 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="row justify-content-md-center" >
|
<div class="row justify-content-md-center" >
|
||||||
<div class="col col-md-6">
|
<div class="col col-md-6">
|
||||||
{% for market in markets %}
|
<ul class="nav nav-tabs">
|
||||||
<h3>{{ market.name }}</h3>
|
|
||||||
{% endfor %}
|
{% for market in markets %}
|
||||||
|
{# <h3>{{ market.name }}</h3>#}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" aria-current="page" href="#">{{ market.name }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link active" aria-current="page" href="#">All</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{# <li class="nav-item">#}
|
||||||
|
{# <a class="nav-link active" aria-current="page" href="#">Active</a>#}
|
||||||
|
{# </li>#}
|
||||||
|
{# <li class="nav-item">#}
|
||||||
|
{# <a class="nav-link" href="#">Link</a>#}
|
||||||
|
{# </li>#}
|
||||||
|
{# <li class="nav-item">#}
|
||||||
|
{# <a class="nav-link" href="#">Link</a>#}
|
||||||
|
{# </li>#}
|
||||||
|
{# <li class="nav-item">#}
|
||||||
|
{# <a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>#}
|
||||||
|
{# </li>#}
|
||||||
|
</ul>
|
||||||
{% if taxes %}
|
{% if taxes %}
|
||||||
<table class="table table-dark table-striped">
|
<table class="table table-dark table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -45,15 +45,15 @@ Encore
|
|||||||
// enables hashed filenames (e.g. app.abc123.css)
|
// enables hashed filenames (e.g. app.abc123.css)
|
||||||
.enableVersioning(Encore.isProduction())
|
.enableVersioning(Encore.isProduction())
|
||||||
|
|
||||||
.configureBabel((config) => {
|
// .configureBabel((config) => {
|
||||||
config.plugins.push('@babel/plugin-proposal-class-properties');
|
// config.plugins.push('@babel/plugin-transform-class-properties');
|
||||||
})
|
// })
|
||||||
|
//
|
||||||
// enables @babel/preset-env polyfills
|
// // enables @babel/preset-env polyfills
|
||||||
.configureBabelPresetEnv((config) => {
|
// .configureBabelPresetEnv((config) => {
|
||||||
config.useBuiltIns = 'usage';
|
// config.useBuiltIns = 'usage';
|
||||||
config.corejs = 3;
|
// config.corejs = 3;
|
||||||
})
|
// })
|
||||||
|
|
||||||
// enables Sass/SCSS support
|
// enables Sass/SCSS support
|
||||||
//.enableSassLoader()
|
//.enableSassLoader()
|
||||||
|
|||||||
Reference in New Issue
Block a user