Working MongoDB integration

main
František Špaček 2 years ago
parent 098f4b46cb
commit 11e1932120

10
.env

@ -25,7 +25,8 @@ APP_SECRET=81d9eeb71d116d422bb931d0c810ce44
# #
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4" # DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
#DATABASE_URL=mongo://172.22.1.110:27017
###< doctrine/doctrine-bundle ### ###< doctrine/doctrine-bundle ###
###> symfony/messenger ### ###> symfony/messenger ###
@ -40,6 +41,9 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###< symfony/mailer ### ###< symfony/mailer ###
###> doctrine/mongodb-odm-bundle ### ###> doctrine/mongodb-odm-bundle ###
MONGODB_URL=mongodb://localhost:27017 MONGODB_URL=mongodb://172.22.1.110:27017
MONGODB_DB=symfony MONGODB_DB=charts
MONGODB_USER=webapp
MONGODB_PASS=webapp
MONGODB_AUTH=charts
###< doctrine/mongodb-odm-bundle ### ###< doctrine/mongodb-odm-bundle ###

@ -10,8 +10,10 @@
"doctrine/dbal": "^3", "doctrine/dbal": "^3",
"doctrine/doctrine-bundle": "^2.12", "doctrine/doctrine-bundle": "^2.12",
"doctrine/doctrine-migrations-bundle": "^3.3", "doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/mongodb-odm-bundle": "^5.0", "doctrine/mongodb-odm": "^2.7",
"doctrine/mongodb-odm-bundle": "^5.*",
"doctrine/orm": "^3.1", "doctrine/orm": "^3.1",
"mongodb/mongodb": "^1.18",
"phpdocumentor/reflection-docblock": "^5.3", "phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.27", "phpstan/phpdoc-parser": "^1.27",
"symfony/apache-pack": "^1.0", "symfony/apache-pack": "^1.0",

22
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ac1ace3d152830a03eede47ce72777f9", "content-hash": "46a368f6c1680011c0f2e135980f8df9",
"packages": [ "packages": [
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
@ -1697,23 +1697,23 @@
}, },
{ {
"name": "mongodb/mongodb", "name": "mongodb/mongodb",
"version": "1.17.1", "version": "1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mongodb/mongo-php-library.git", "url": "https://github.com/mongodb/mongo-php-library.git",
"reference": "01d0840bf0678f519e72dc71b69c8a50a0856c2d" "reference": "d421c418ef56a96f3dfa6b2828f936df6848ccf9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/01d0840bf0678f519e72dc71b69c8a50a0856c2d", "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/d421c418ef56a96f3dfa6b2828f936df6848ccf9",
"reference": "01d0840bf0678f519e72dc71b69c8a50a0856c2d", "reference": "d421c418ef56a96f3dfa6b2828f936df6848ccf9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer-runtime-api": "^2.0",
"ext-hash": "*", "ext-hash": "*",
"ext-json": "*", "ext-json": "*",
"ext-mongodb": "^1.17.0", "ext-mongodb": "^1.18.0",
"jean85/pretty-package-versions": "^2.0.1",
"php": "^7.4 || ^8.0", "php": "^7.4 || ^8.0",
"psr/log": "^1.1.4|^2|^3", "psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php80": "^1.27", "symfony/polyfill-php80": "^1.27",
@ -1729,7 +1729,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17.x-dev" "dev-master": "1.18.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -1768,9 +1768,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/mongodb/mongo-php-library/issues", "issues": "https://github.com/mongodb/mongo-php-library/issues",
"source": "https://github.com/mongodb/mongo-php-library/tree/1.17.1" "source": "https://github.com/mongodb/mongo-php-library/tree/1.18.0"
}, },
"time": "2024-03-14T10:33:11+00:00" "time": "2024-03-27T17:04:50+00:00"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
@ -9887,5 +9887,5 @@
"ext-iconv": "*" "ext-iconv": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.2.0" "plugin-api-version": "2.3.0"
} }

@ -4,7 +4,10 @@ doctrine_mongodb:
connections: connections:
default: default:
server: '%env(resolve:MONGODB_URL)%' server: '%env(resolve:MONGODB_URL)%'
options: {} options:
username: '%env(resolve:MONGODB_USER)%'
password: '%env(resolve:MONGODB_PASS)%'
authSource: '%env(resolve:MONGODB_AUTH)%'
default_database: '%env(resolve:MONGODB_DB)%' default_database: '%env(resolve:MONGODB_DB)%'
document_managers: document_managers:
default: default:

@ -0,0 +1,53 @@
main {
display: block;
}
#mainDiv {
width: 100%;
display: flex;
padding: 10px;
}
#graphDiv {
width: 75%;
height: 450px;
}
#settings_div {
text-align: center;
width: 25%;
}
#tableDiv {
padding: 0;
overflow: auto;
flex-basis: 75%;
}
#shareDiv {
padding: 5px;
flex-basis: 25%;
margin-left: 5px;
}
#secondaryDiv {
display: flex;
}
#shareUsername {
width: 100px;
height: 35px;
}
#shareHeader {
text-align: center;
}
@media (max-width: 950px) {
#mainDiv {display: block}
#graphDiv {width: 100%;}
#settings_div {width: 100%; display: block}
#tableDiv {width: 100%}
#shareDiv {width: 100%}
#secondaryDiv {display: block}
}

@ -0,0 +1,159 @@
#graphDiv {
height: 100%;
}
body {
height: 100%;
margin: 0;
}
html {
height: 100%;
}
#dataDiv {
display: none;
position: absolute;
height: 35px;
width: 70px;
background-color: white;
border: 1px solid lightgrey;
padding: 5px;
border-radius: 5px;
}
#dataDiv p {
margin: 0;
font-size: 13px;
}
#dataDiv b{
position: center;
font-size: 13px;
}
#graphLegend {
display: none;
justify-content: center;
align-items: center;
text-align: center;
}
#graphLegend div {
display: inline;
margin: 0 10px 0 10px;
width: 50px;
}
#settings_div{
width: 300px;
padding: 5px;
background-color: var(--main);
}
#settings_div h2{
color: var(--dark);
}
#shareDiv{
width: 300px;
padding: 5px;
background-color: var(--side);
}
#shareDiv h2{
color: var(--dark);
}
table {
margin-top: 20px;
width: 100%;
}
table, th, td {
border-collapse: collapse;
}
th, td {
padding: 4px;
border: 1px solid darkgrey;
min-width: 100px;
text-align: center;
}
tr:nth-child(even) td:not(.UI_remove_row){
background-color: var(--main);
}
th {
background-color: var(--main-dark);
}
th div {
color: var(--light);
}
th input {
padding: 0;
margin: 0;
}
[contenteditable] {
outline: 0 solid transparent;
}
#rcMenu {
z-index: 1000;
position: absolute;
background-color: white;
border: 1px solid lightgrey;
box-shadow: 2px 2px 2px gray;
display: none;
margin: 0;
width: 180px;
}
#rcMenu ul{
list-style-type: none;
padding-left: 10px;
width: 180px;
}
#rcMenu a {
text-decoration: none;
border-bottom: 1px solid lightgrey;
width: 160px;
display: block;
}
#rcMenu a:hover{
background-color: lightgrey;
}
#shareDiv {
background-color: var(--main);
}
#shareList {
border: 1px solid var(--main-dark);
}
#shareList div{
padding: 5px;
}
#shareList div button{
color: red;
display: inline-block;
float: right;
height: 25px;
margin: 0;
padding: 2px;
}
#shareList div button:hover{
background-color: var(--side);
color: red;
display: flex;
transition: 300ms;
}

@ -0,0 +1,176 @@
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700;800&display=swap');
:root {
--dark: #1E1B18;
--light: #E3E7F1;
--side: #E3E7F1;
--main: #7391C8;
--main-dark: #52688F;
}
* {
font-family: 'Open Sans', sans-serif;
color: var(--dark);
}
body {
margin: 0;
padding: 0;
}
button {
background-color: var(--main-dark);
border: none;
color: white;
padding: 10px 15px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 5px;
}
header {
display: flex;
background-color: var(--main-dark);
margin: 0;
}
header #logo {
text-align: center;
flex-basis: 20%;
display: flex;
}
header nav {
display: flex;
flex-basis: 70%;
justify-content: flex-end;
}
header #user {
flex-basis: 10%;
display: flex;
}
header #user a {
flex-basis: 100%;
text-align: center;
background-color: var(--main);
color: var(--dark);
}
header #user a:hover {
background-color: var(--main-dark);
}
header a {
text-decoration: none;
color: var(--light);
font-weight: 600;
font-size: 1em;
line-height: 1.4em;
padding: 1.4em 2em;
transition: 300ms;
}
header a:hover {
background-color: var(--main-dark);
}
body {
background-color: var(--light);
}
main {
height: calc(100vh - 4.2em);
width: 100%;
display: flex;
padding: 0;
}
h1 {
color: var(--light);
font-size: 1.6em;
margin: 2em 0 0 0;
flex-basis: 100%;
}
h2 {
color: var(--side);
font-size: 1.2em;
}
.loginDiv {
min-width: 300px;
width: 60%;
margin: 50px auto;
text-align: center;
background-color: var(--main);
}
.loginDiv .msg {
color: red;
}
.loginDiv #logoutBtn {
color: red;
}
#myGraphs {
width: 50%;
height: calc(100vh - 4.2em);
margin: 0;
text-align: center;
background-color: var(--main);
display: inline-block;
}
#myGraphs #createGraphBtn {
color: limegreen;
}
#myGraphList div, #sharedGraphList div{
width: 80%;
margin: 10px 10%;
border: 1px solid var(--main-dark);
padding: 5px;
text-align: left;
}
#myGraphList div a, #sharedGraphList div a{
text-decoration: none;
display: inline-block;
height: 100%;
width: 75%;
padding: 5px;
}
#myGraphList div button{
color: red;
display: inline-block;
float: right;
margin: 0;
padding: 5px;
}
#myGraphList div button:hover{
background-color: var(--side);
color: red;
display: flex;
transition: 300ms;
}
#sharedGraphs {
width: 50%;
height: calc(100vh - 4.2em);
margin: 0;
text-align: center;
background-color: var(--side);
display: inline-block;
}
#sharedGraphs h1{
color: var(--dark);
padding-bottom: 52px;
}

@ -9,9 +9,8 @@ use Symfony\Component\Routing\Annotation\Route;
class IndexController extends AbstractController class IndexController extends AbstractController
{ {
#[Route('/', name: 'homepage')] #[Route('/', name: 'homepage')]
public function index(): Response public function indexAction(): Response
{ {
#return new Response("response</body></html>");
return $this->render('index.html.twig'); return $this->render('index.html.twig');
} }

@ -0,0 +1,46 @@
<?php
namespace App\Controller;
use App\Form\Model\Registration;
use App\Form\Type\RegistrationType;
use Doctrine\ODM\MongoDB\DocumentManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Redirect;
use Symfony\Component\Routing\Annotation\Route;
class UserController extends AbstractController
{
#[Route('/register', name: 'register')]
public function registerAction(): Response
{
$form = $this->createForm(RegistrationType::class, new Registration());
return $this->render('register.html.twig', [
'form' => $form->createView()
]);
}
#[Route('/create', name: 'create')]
public function createAction(DocumentManager $dm, Request $request)
{
$form = $this->createForm(RegistrationType::class, new Registration());
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$registration = $form->getData();
$dm->persist($registration->getUser());
$dm->flush();
return $this->redirect('/');
}
return $this->render('register.html.twig', [
'form' => $form->createView()
]);
}
}

@ -0,0 +1,65 @@
<?php
namespace App\Document;
use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique as MongoDBUnique;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use Symfony\Component\Validator\Constraints as Assert;
#[MongoDB\Document(collection: 'charts')]
#[MongoDB\Unique(fields: 'code')]
class Chart
{
/**
* @MongoDB\Id
*/
#[MongoDB\Id]
protected string $id;
#[MongoDB\Field(type: 'string')]
#[Assert\NotBlank]
protected ?string $name = null;
#[MongoDB\Field(type: 'string')]
#[Assert\NotBlank]
protected ?string $code = null;
#[MongoDB\Field(type: 'object')]
#[Assert\NotBlank]
protected ?string $metadata = null;
public function getId(): string
{
return $this->id;
}
public function getNamel(): ?string
{
return $this->name;
}
public function setName(?string $name): void
{
$this->name = $name;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): void
{
$this->code = $code;
}
public function getMetadata(): ?string
{
return $this->metadata;
}
public function setMetadata(?string $metadata): void
{
$this->metadata = $metadata;
}
}

@ -0,0 +1,53 @@
<?php
namespace App\Document;
use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique as MongoDBUnique;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use Symfony\Component\Validator\Constraints as Assert;
#[MongoDB\Document(collection: 'users')]
#[MongoDB\Unique(fields: 'email')]
class User
{
/**
* @MongoDB\Id
*/
#[MongoDB\Id]
protected string $id;
#[MongoDB\Field(type: 'string')]
#[Assert\NotBlank]
#[Assert\Email]
protected ?string $email = null;
#[MongoDB\Field(type: 'string')]
#[Assert\NotBlank]
protected ?string $password = null;
public function getId(): string
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): void
{
$this->email = $email;
}
public function getPassword(): ?string
{
return $this->password;
}
// stupid simple encryption (please don't copy it!)
public function setPassword(?string $password): void
{
$this->password = sha1($password);
}
}

@ -0,0 +1,41 @@
<?php
// src/Form/Model/Registration.php
namespace App\Form\Model;
use App\Document\User;
use Symfony\Component\Validator\Constraints as Assert;
class Registration
{
/**
* @Assert\Type(type="App\Document\User")
*/
protected $user;
/**
* @Assert\NotBlank()
* @Assert\IsTrue()
*/
protected $termsAccepted;
public function setUser(User $user)
{
$this->user = $user;
}
public function getUser()
{
return $this->user;
}
public function getTermsAccepted()
{
return $this->termsAccepted;
}
public function setTermsAccepted($termsAccepted)
{
$this->termsAccepted = (bool) $termsAccepted;
}
}

@ -0,0 +1,17 @@
<?php
// src/Form/Type/RegistrationType.php
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\FormBuilderInterface;
class RegistrationType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('user', UserType::class);
$builder->add('terms', CheckboxType::class, ['property_path' => 'termsAccepted']);
}
}

@ -0,0 +1,32 @@
<?php
// src/Form/Type/UserType.php
namespace App\Form\Type;
use App\Document\User;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class UserType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('email', EmailType::class);
$builder->add('password', RepeatedType::class, [
'first_name' => 'password',
'second_name' => 'confirm',
'type' => PasswordType::class
]);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => User::class,
]);
}
}

@ -0,0 +1,48 @@
<?php
namespace App\Repository;
use App\Entity\Chart;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Chart>
*
* @method Chart|null find($id, $lockMode = null, $lockVersion = null)
* @method Chart|null findOneBy(array $criteria, array $orderBy = null)
* @method Chart[] findAll()
* @method Chart[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class ChartRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Chart::class);
}
// /**
// * @return Chart[] Returns an array of Chart objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('c')
// ->andWhere('c.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('c.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Chart
// {
// return $this->createQueryBuilder('c')
// ->andWhere('c.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

@ -0,0 +1,48 @@
<?php
namespace App\Repository;
use App\Entity\User;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<User>
*
* @method User|null find($id, $lockMode = null, $lockVersion = null)
* @method User|null findOneBy(array $criteria, array $orderBy = null)
* @method User[] findAll()
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class UserRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, User::class);
}
// /**
// * @return User[] Returns an array of User objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('u')
// ->andWhere('u.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('u.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?User
// {
// return $this->createQueryBuilder('u')
// ->andWhere('u.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

@ -4,9 +4,9 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title> <title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>"> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %} {% block stylesheets %}
{{ encore_entry_link_tags('app') }} {{ encore_entry_link_tags('app') }}
<link href="{{ asset('styles/web_style.css') }}" rel="stylesheet"/>
{% endblock %} {% endblock %}
{% block javascripts %} {% block javascripts %}
@ -14,6 +14,7 @@
{% endblock %} {% endblock %}
</head> </head>
<body> <body>
{% include "header.html.twig" %}
{% block body %}{% endblock %} {% block body %}{% endblock %}
</body> </body>
</html> </html>

@ -0,0 +1,11 @@
<header id="mainHeader">
<div id="logo">
<a href="index.html">EasyCharts</a>
</div>
<nav>
<a href="docs.html">Documentation</a>
</nav>
<div id="user">
<a href="login.html">Login</a>
</div>
</header>

@ -0,0 +1,6 @@
{# templates/egister.html.twig #}
{{ form_start(form, {'action': path('create'), 'method': 'POST'}) }}
{{ form_widget(form) }}
<input type="submit" />
{{ form_end(form) }}

@ -2,6 +2,24 @@
// autoload.php @generated by Composer // autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit4fe506277082b063a84f05968212cec8::getLoader(); return ComposerAutoloaderInit4fe506277082b063a84f05968212cec8::getLoader();

@ -42,35 +42,37 @@ namespace Composer\Autoload;
*/ */
class ClassLoader class ClassLoader
{ {
/** @var ?string */ /** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir; private $vendorDir;
// PSR-4 // PSR-4
/** /**
* @var array[] * @var array<string, array<string, int>>
* @psalm-var array<string, array<string, int>>
*/ */
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/** /**
* @var array[] * @var array<string, list<string>>
* @psalm-var array<string, array<int, string>>
*/ */
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/** /**
* @var array[] * List of PSR-0 prefixes
* @psalm-var array<string, array<string, string[]>> *
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/ */
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/** /**
* @var array[] * @var list<string>
* @psalm-var array<string, string>
*/ */
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
@ -78,8 +80,7 @@ class ClassLoader
private $useIncludePath = false; private $useIncludePath = false;
/** /**
* @var string[] * @var array<string, string>
* @psalm-var array<string, string>
*/ */
private $classMap = array(); private $classMap = array();
@ -87,29 +88,29 @@ class ClassLoader
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/** /**
* @var bool[] * @var array<string, bool>
* @psalm-var array<string, bool>
*/ */
private $missingClasses = array(); private $missingClasses = array();
/** @var ?string */ /** @var string|null */
private $apcuPrefix; private $apcuPrefix;
/** /**
* @var self[] * @var array<string, self>
*/ */
private static $registeredLoaders = array(); private static $registeredLoaders = array();
/** /**
* @param ?string $vendorDir * @param string|null $vendorDir
*/ */
public function __construct($vendorDir = null) public function __construct($vendorDir = null)
{ {
$this->vendorDir = $vendorDir; $this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
} }
/** /**
* @return string[] * @return array<string, list<string>>
*/ */
public function getPrefixes() public function getPrefixes()
{ {
@ -121,8 +122,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return array<string, list<string>>
* @psalm-return array<string, array<int, string>>
*/ */
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
@ -130,8 +130,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirs() public function getFallbackDirs()
{ {
@ -139,8 +138,7 @@ class ClassLoader
} }
/** /**
* @return array[] * @return list<string>
* @psalm-return array<string, string>
*/ */
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
@ -148,8 +146,7 @@ class ClassLoader
} }
/** /**
* @return string[] Array of classname => path * @return array<string, string> Array of classname => path
* @psalm-return array<string, string>
*/ */
public function getClassMap() public function getClassMap()
{ {
@ -157,8 +154,7 @@ class ClassLoader
} }
/** /**
* @param string[] $classMap Class to filename map * @param array<string, string> $classMap Class to filename map
* @psalm-param array<string, string> $classMap
* *
* @return void * @return void
*/ */
@ -176,23 +172,24 @@ class ClassLoader
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories * @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @return void * @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr0 $this->fallbackDirsPsr0
); );
} else { } else {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0, $this->fallbackDirsPsr0,
(array) $paths $paths
); );
} }
@ -201,19 +198,19 @@ class ClassLoader
$first = $prefix[0]; $first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) { if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths; $this->prefixesPsr0[$first][$prefix] = $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixesPsr0[$first][$prefix] $this->prefixesPsr0[$first][$prefix]
); );
} else { } else {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix], $this->prefixesPsr0[$first][$prefix],
(array) $paths $paths
); );
} }
} }
@ -223,7 +220,7 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
@ -232,17 +229,18 @@ class ClassLoader
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
// Register directories for the root namespace. // Register directories for the root namespace.
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr4 $this->fallbackDirsPsr4
); );
} else { } else {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4, $this->fallbackDirsPsr4,
(array) $paths $paths
); );
} }
} elseif (!isset($this->prefixDirsPsr4[$prefix])) { } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@ -252,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
} }
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths; $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) { } elseif ($prepend) {
// Prepend directories for an already registered namespace. // Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixDirsPsr4[$prefix] $this->prefixDirsPsr4[$prefix]
); );
} else { } else {
// Append directories for an already registered namespace. // Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix], $this->prefixDirsPsr4[$prefix],
(array) $paths $paths
); );
} }
} }
@ -273,7 +271,7 @@ class ClassLoader
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories * @param list<string>|string $paths The PSR-0 base directories
* *
* @return void * @return void
*/ */
@ -291,7 +289,7 @@ class ClassLoader
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
@ -425,7 +423,8 @@ class ClassLoader
public function loadClass($class) public function loadClass($class)
{ {
if ($file = $this->findFile($class)) { if ($file = $this->findFile($class)) {
includeFile($file); $includeFile = self::$includeFile;
$includeFile($file);
return true; return true;
} }
@ -476,9 +475,9 @@ class ClassLoader
} }
/** /**
* Returns the currently registered loaders indexed by their corresponding vendor directories. * Returns the currently registered loaders keyed by their corresponding vendor directories.
* *
* @return self[] * @return array<string, self>
*/ */
public static function getRegisteredLoaders() public static function getRegisteredLoaders()
{ {
@ -555,18 +554,26 @@ class ClassLoader
return false; return false;
} }
}
/** /**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include. * Scope isolated include.
* *
* Prevents access to $this/self from included files. * Prevents access to $this/self from included files.
* *
* @param string $file * @param string $file
* @return void * @return void
* @private
*/ */
function includeFile($file) self::$includeFile = \Closure::bind(static function($file) {
{
include $file; include $file;
}, null, null);
}
} }

@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
* *
* To require its presence, you can require `composer-runtime-api ^2.0` * To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/ */
class InstalledVersions class InstalledVersions
{ {
/** /**
* @var mixed[]|null * @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/ */
private static $installed; private static $installed;
@ -37,7 +39,7 @@ class InstalledVersions
/** /**
* @var array[] * @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/ */
private static $installedByVendor = array(); private static $installedByVendor = array();
@ -96,7 +98,7 @@ class InstalledVersions
{ {
foreach (self::getInstalled() as $installed) { foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) { if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
} }
} }
@ -117,7 +119,7 @@ class InstalledVersions
*/ */
public static function satisfies(VersionParser $parser, $packageName, $constraint) public static function satisfies(VersionParser $parser, $packageName, $constraint)
{ {
$constraint = $parser->parseConstraints($constraint); $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint); return $provided->matches($constraint);
@ -241,7 +243,7 @@ class InstalledVersions
/** /**
* @return array * @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/ */
public static function getRootPackage() public static function getRootPackage()
{ {
@ -255,7 +257,7 @@ class InstalledVersions
* *
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[] * @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/ */
public static function getRawData() public static function getRawData()
{ {
@ -278,7 +280,7 @@ class InstalledVersions
* Returns the raw data of all installed.php which are currently loaded for custom implementations * Returns the raw data of all installed.php which are currently loaded for custom implementations
* *
* @return array[] * @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/ */
public static function getAllRawData() public static function getAllRawData()
{ {
@ -301,7 +303,7 @@ class InstalledVersions
* @param array[] $data A vendor/composer/installed.php data set * @param array[] $data A vendor/composer/installed.php data set
* @return void * @return void
* *
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/ */
public static function reload($data) public static function reload($data)
{ {
@ -311,7 +313,7 @@ class InstalledVersions
/** /**
* @return array[] * @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}> * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/ */
private static function getInstalled() private static function getInstalled()
{ {
@ -326,7 +328,9 @@ class InstalledVersions
if (isset(self::$installedByVendor[$vendorDir])) { if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir]; $installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) { } elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1]; self::$installed = $installed[count($installed) - 1];
} }
@ -338,12 +342,17 @@ class InstalledVersions
// only require the installed.php file if this file is loaded from its dumped location, // only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') { if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php'; /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else { } else {
self::$installed = array(); self::$installed = array();
} }
} }
if (self::$installed !== array()) {
$installed[] = self::$installed; $installed[] = self::$installed;
}
return $installed; return $installed;
} }

@ -2,12 +2,16 @@
// autoload_classmap.php @generated by Composer // autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'App\\Controller\\IndexController' => $baseDir . '/src/Controller/IndexController.php', 'App\\Controller\\IndexController' => $baseDir . '/src/Controller/IndexController.php',
'App\\Entity\\Chart' => $baseDir . '/src/Entity/Chart.php',
'App\\Entity\\User' => $baseDir . '/src/Entity/User.php',
'App\\Kernel' => $baseDir . '/src/Kernel.php', 'App\\Kernel' => $baseDir . '/src/Kernel.php',
'App\\Repository\\ChartRepository' => $baseDir . '/src/Repository/ChartRepository.php',
'App\\Repository\\UserRepository' => $baseDir . '/src/Repository/UserRepository.php',
'Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php', 'Collator' => $vendorDir . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'DateError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateError.php', 'DateError' => $vendorDir . '/symfony/polyfill-php83/Resources/stubs/DateError.php',
@ -1723,6 +1727,7 @@ return array(
'MongoDB\\GridFS\\CollectionWrapper' => $vendorDir . '/mongodb/mongodb/src/GridFS/CollectionWrapper.php', 'MongoDB\\GridFS\\CollectionWrapper' => $vendorDir . '/mongodb/mongodb/src/GridFS/CollectionWrapper.php',
'MongoDB\\GridFS\\Exception\\CorruptFileException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/CorruptFileException.php', 'MongoDB\\GridFS\\Exception\\CorruptFileException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/CorruptFileException.php',
'MongoDB\\GridFS\\Exception\\FileNotFoundException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/FileNotFoundException.php', 'MongoDB\\GridFS\\Exception\\FileNotFoundException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/FileNotFoundException.php',
'MongoDB\\GridFS\\Exception\\LogicException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/LogicException.php',
'MongoDB\\GridFS\\Exception\\StreamException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/StreamException.php', 'MongoDB\\GridFS\\Exception\\StreamException' => $vendorDir . '/mongodb/mongodb/src/GridFS/Exception/StreamException.php',
'MongoDB\\GridFS\\ReadableStream' => $vendorDir . '/mongodb/mongodb/src/GridFS/ReadableStream.php', 'MongoDB\\GridFS\\ReadableStream' => $vendorDir . '/mongodb/mongodb/src/GridFS/ReadableStream.php',
'MongoDB\\GridFS\\StreamWrapper' => $vendorDir . '/mongodb/mongodb/src/GridFS/StreamWrapper.php', 'MongoDB\\GridFS\\StreamWrapper' => $vendorDir . '/mongodb/mongodb/src/GridFS/StreamWrapper.php',

@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer // autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

@ -2,7 +2,7 @@
// autoload_psr4.php @generated by Composer // autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

@ -25,56 +25,26 @@ class ComposerAutoloaderInit4fe506277082b063a84f05968212cec8
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit4fe506277082b063a84f05968212cec8', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit4fe506277082b063a84f05968212cec8', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit4fe506277082b063a84f05968212cec8', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit4fe506277082b063a84f05968212cec8', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit4fe506277082b063a84f05968212cec8::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit4fe506277082b063a84f05968212cec8::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { $filesToLoad = \Composer\Autoload\ComposerStaticInit4fe506277082b063a84f05968212cec8::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit4fe506277082b063a84f05968212cec8::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire4fe506277082b063a84f05968212cec8($fileIdentifier, $file);
}
return $loader;
}
}
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire4fe506277082b063a84f05968212cec8($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file; require $file;
} }
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
} }

@ -7,21 +7,21 @@ namespace Composer\Autoload;
class ComposerStaticInit4fe506277082b063a84f05968212cec8 class ComposerStaticInit4fe506277082b063a84f05968212cec8
{ {
public static $files = array ( public static $files = array (
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php',
'92c8763cd6170fce6fcfe7e26b4e8c10' => __DIR__ . '/..' . '/symfony/phpunit-bridge/bootstrap.php',
'662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php', '662a729f963d39afe703c9d9b7ab4a8c' => __DIR__ . '/..' . '/symfony/polyfill-php83/bootstrap.php',
'2203a247e6fda86070a5e4e07aed533a' => __DIR__ . '/..' . '/symfony/clock/Resources/now.php',
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php', '8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php', '2203a247e6fda86070a5e4e07aed533a' => __DIR__ . '/..' . '/symfony/clock/Resources/now.php',
'3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php', '3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php',
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'6a47392539ca2329373e0d33e1dba053' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/bootstrap.php',
'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'92c8763cd6170fce6fcfe7e26b4e8c10' => __DIR__ . '/..' . '/symfony/phpunit-bridge/bootstrap.php',
'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
); );
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
@ -597,7 +597,11 @@ class ComposerStaticInit4fe506277082b063a84f05968212cec8
public static $classMap = array ( public static $classMap = array (
'App\\Controller\\IndexController' => __DIR__ . '/../..' . '/src/Controller/IndexController.php', 'App\\Controller\\IndexController' => __DIR__ . '/../..' . '/src/Controller/IndexController.php',
'App\\Entity\\Chart' => __DIR__ . '/../..' . '/src/Entity/Chart.php',
'App\\Entity\\User' => __DIR__ . '/../..' . '/src/Entity/User.php',
'App\\Kernel' => __DIR__ . '/../..' . '/src/Kernel.php', 'App\\Kernel' => __DIR__ . '/../..' . '/src/Kernel.php',
'App\\Repository\\ChartRepository' => __DIR__ . '/../..' . '/src/Repository/ChartRepository.php',
'App\\Repository\\UserRepository' => __DIR__ . '/../..' . '/src/Repository/UserRepository.php',
'Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php', 'Collator' => __DIR__ . '/..' . '/symfony/polyfill-intl-icu/Resources/stubs/Collator.php',
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'DateError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateError.php', 'DateError' => __DIR__ . '/..' . '/symfony/polyfill-php83/Resources/stubs/DateError.php',
@ -2313,6 +2317,7 @@ class ComposerStaticInit4fe506277082b063a84f05968212cec8
'MongoDB\\GridFS\\CollectionWrapper' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/CollectionWrapper.php', 'MongoDB\\GridFS\\CollectionWrapper' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/CollectionWrapper.php',
'MongoDB\\GridFS\\Exception\\CorruptFileException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/CorruptFileException.php', 'MongoDB\\GridFS\\Exception\\CorruptFileException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/CorruptFileException.php',
'MongoDB\\GridFS\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/FileNotFoundException.php', 'MongoDB\\GridFS\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/FileNotFoundException.php',
'MongoDB\\GridFS\\Exception\\LogicException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/LogicException.php',
'MongoDB\\GridFS\\Exception\\StreamException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/StreamException.php', 'MongoDB\\GridFS\\Exception\\StreamException' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/Exception/StreamException.php',
'MongoDB\\GridFS\\ReadableStream' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/ReadableStream.php', 'MongoDB\\GridFS\\ReadableStream' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/ReadableStream.php',
'MongoDB\\GridFS\\StreamWrapper' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/StreamWrapper.php', 'MongoDB\\GridFS\\StreamWrapper' => __DIR__ . '/..' . '/mongodb/mongodb/src/GridFS/StreamWrapper.php',

@ -1821,24 +1821,24 @@
}, },
{ {
"name": "mongodb/mongodb", "name": "mongodb/mongodb",
"version": "1.17.1", "version": "1.18.0",
"version_normalized": "1.17.1.0", "version_normalized": "1.18.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mongodb/mongo-php-library.git", "url": "https://github.com/mongodb/mongo-php-library.git",
"reference": "01d0840bf0678f519e72dc71b69c8a50a0856c2d" "reference": "d421c418ef56a96f3dfa6b2828f936df6848ccf9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/01d0840bf0678f519e72dc71b69c8a50a0856c2d", "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/d421c418ef56a96f3dfa6b2828f936df6848ccf9",
"reference": "01d0840bf0678f519e72dc71b69c8a50a0856c2d", "reference": "d421c418ef56a96f3dfa6b2828f936df6848ccf9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer-runtime-api": "^2.0",
"ext-hash": "*", "ext-hash": "*",
"ext-json": "*", "ext-json": "*",
"ext-mongodb": "^1.17.0", "ext-mongodb": "^1.18.0",
"jean85/pretty-package-versions": "^2.0.1",
"php": "^7.4 || ^8.0", "php": "^7.4 || ^8.0",
"psr/log": "^1.1.4|^2|^3", "psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php80": "^1.27", "symfony/polyfill-php80": "^1.27",
@ -1851,11 +1851,11 @@
"symfony/phpunit-bridge": "^5.2", "symfony/phpunit-bridge": "^5.2",
"vimeo/psalm": "^5.13" "vimeo/psalm": "^5.13"
}, },
"time": "2024-03-14T10:33:11+00:00", "time": "2024-03-27T17:04:50+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17.x-dev" "dev-master": "1.18.x-dev"
} }
}, },
"installation-source": "dist", "installation-source": "dist",
@ -1895,7 +1895,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/mongodb/mongo-php-library/issues", "issues": "https://github.com/mongodb/mongo-php-library/issues",
"source": "https://github.com/mongodb/mongo-php-library/tree/1.17.1" "source": "https://github.com/mongodb/mongo-php-library/tree/1.18.0"
}, },
"install-path": "../mongodb/mongodb" "install-path": "../mongodb/mongodb"
}, },

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save

Powered by TurnKey Linux.