Skip to content

Commit

Permalink
Add files for 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed May 4, 2024
1 parent 4b7ad46 commit fea745c
Show file tree
Hide file tree
Showing 3,516 changed files with 302,071 additions and 4 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
45 changes: 45 additions & 0 deletions composer/composer-2024-05-04-before.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

{
"require": {
"php": ">=8.2.0",
"phpseclib/phpseclib": "3.0.35",
"laravel/lumen-framework": "v10.0.0",
"firebase/php-jwt" : "v6.4.0",
"ezyang/htmlpurifier": "v4.16.0",
"cboden/ratchet" : "v0.4.4",

"symfony/routing" : "v6.2.8",
"symfony/http-foundation" : "v6.2.10",
"react/event-loop" : "v1.3.0",
"react/stream" : "v1.2.0",
"react/promise-timer" : "v1.9.0",
"react/dns" : "v1.10.0",
"react/socket" : "v1.12.0",
"monolog/monolog" : "3.3.1",
"symfony/translation" : "v6.2.8",
"symfony/browser-kit" : "v6.2",
"symfony/http-client" : "v6.2",
"symfony/http-kernel" : "v6.2.6",
"symfony/deprecation-contracts": "v3.4.0",
"symfony/polyfill-intl-idn": "v1.28.0",
"symfony/polyfill-intl-normalizer": "v1.28.0",
"symfony/polyfill-mbstring": "v1.28.0",
"symfony/polyfill-php72": "v1.28.0",
"guzzlehttp/psr7" : "v2.5.0",
"psr/http-client": "1.0.3",
"guzzlehttp/guzzle": "7.7.1",
"guzzlehttp/promises": "2.0.2",

"google/auth": "1.34",
"google/apiclient": "v2.15.3",
"google/apiclient-services": "0.333.0",

"nesbot/carbon" : "2.68.1",

"tsugi/lib": "dev-master#5143de10d4ca185330913494ddbf1b72816c05ea",
"koseu/lib": "dev-master#70c7ac1ca413c2dd541e078ebe07719405621b1b"
},
"config": {
"preferred-install": "dist"
}
}
21 changes: 21 additions & 0 deletions vendor/carbonphp/carbon-doctrine-types/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Carbon

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 14 additions & 0 deletions vendor/carbonphp/carbon-doctrine-types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# carbonphp/carbon-doctrine-types

Types to use Carbon in Doctrine

## Documentation

[Check how to use in the official Carbon documentation](https://carbon.nesbot.com/symfony/)

This package is an externalization of [src/Carbon/Doctrine](https://github.com/briannesbitt/Carbon/tree/2.71.0/src/Carbon/Doctrine)
from `nestbot/carbon` package.

Externalization allows to better deal with different versions of dbal. With
version 4.0 of dbal, it no longer sustainable to be compatible with all version
using a single code.
36 changes: 36 additions & 0 deletions vendor/carbonphp/carbon-doctrine-types/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "carbonphp/carbon-doctrine-types",
"description": "Types to use Carbon in Doctrine",
"type": "library",
"keywords": [
"date",
"time",
"DateTime",
"Carbon",
"Doctrine"
],
"require": {
"php": "^7.4 || ^8.0"
},
"require-dev": {
"doctrine/dbal": "^3.7.0",
"nesbot/carbon": "^2.71.0 || ^3.0.0",
"phpunit/phpunit": "^10.3"
},
"conflict": {
"doctrine/dbal": "<3.7.0 || >=4.0.0"
},
"license": "MIT",
"autoload": {
"psr-4": {
"Carbon\\Doctrine\\": "src/Carbon/Doctrine/"
}
},
"authors": [
{
"name": "KyleKatarn",
"email": "kylekatarnls@gmail.com"
}
],
"minimum-stability": "dev"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Carbon\Doctrine;

use Doctrine\DBAL\Platforms\AbstractPlatform;

interface CarbonDoctrineType
{
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform);

public function convertToPHPValue($value, AbstractPlatform $platform);

public function convertToDatabaseValue($value, AbstractPlatform $platform);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Carbon\Doctrine;

class CarbonImmutableType extends DateTimeImmutableType implements CarbonDoctrineType
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Carbon\Doctrine;

class CarbonType extends DateTimeType implements CarbonDoctrineType
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<?php

namespace Carbon\Doctrine;

use Carbon\Carbon;
use Carbon\CarbonInterface;
use DateTimeInterface;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\DB2Platform;
use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Platforms\SQLServerPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Exception;

/**
* @template T of CarbonInterface
*/
trait CarbonTypeConverter
{
/**
* This property differentiates types installed by carbonphp/carbon-doctrine-types
* from the ones embedded previously in nesbot/carbon source directly.
*
* @readonly
*/
public bool $external = true;

/**
* @return class-string<T>
*/
protected function getCarbonClassName(): string
{
return Carbon::class;
}

public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
{
$precision = min(
$fieldDeclaration['precision'] ?? DateTimeDefaultPrecision::get(),
$this->getMaximumPrecision($platform),
);

$type = parent::getSQLDeclaration($fieldDeclaration, $platform);

if (!$precision) {
return $type;
}

if (str_contains($type, '(')) {
return preg_replace('/\(\d+\)/', "($precision)", $type);
}

[$before, $after] = explode(' ', "$type ");

return trim("$before($precision) $after");
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*
* @return T|null
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
$class = $this->getCarbonClassName();

if ($value === null || is_a($value, $class)) {
return $value;
}

if ($value instanceof DateTimeInterface) {
return $class::instance($value);
}

$date = null;
$error = null;

try {
$date = $class::parse($value);
} catch (Exception $exception) {
$error = $exception;
}

if (!$date) {
throw ConversionException::conversionFailedFormat(
$value,
$this->getTypeName(),
'Y-m-d H:i:s.u or any format supported by '.$class.'::parse()',
$error
);
}

return $date;
}

/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
{
if ($value === null) {
return $value;
}

if ($value instanceof DateTimeInterface) {
return $value->format('Y-m-d H:i:s.u');
}

throw ConversionException::conversionFailedInvalidType(
$value,
$this->getTypeName(),
['null', 'DateTime', 'Carbon']
);
}

private function getTypeName(): string
{
$chunks = explode('\\', static::class);
$type = preg_replace('/Type$/', '', end($chunks));

return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $type));
}

private function getMaximumPrecision(AbstractPlatform $platform): int
{
if ($platform instanceof DB2Platform) {
return 12;
}

if ($platform instanceof OraclePlatform) {
return 9;
}

if ($platform instanceof SQLServerPlatform || $platform instanceof SqlitePlatform) {
return 3;
}

return 6;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Carbon\Doctrine;

class DateTimeDefaultPrecision
{
private static $precision = 6;

/**
* Change the default Doctrine datetime and datetime_immutable precision.
*
* @param int $precision
*/
public static function set(int $precision): void
{
self::$precision = $precision;
}

/**
* Get the default Doctrine datetime and datetime_immutable precision.
*
* @return int
*/
public static function get(): int
{
return self::$precision;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Carbon\Doctrine;

use Carbon\CarbonImmutable;
use Doctrine\DBAL\Types\VarDateTimeImmutableType;

class DateTimeImmutableType extends VarDateTimeImmutableType implements CarbonDoctrineType
{
/** @use CarbonTypeConverter<CarbonImmutable> */
use CarbonTypeConverter;

/**
* @return class-string<CarbonImmutable>
*/
protected function getCarbonClassName(): string
{
return CarbonImmutable::class;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Carbon\Doctrine;

use Carbon\Carbon;
use Doctrine\DBAL\Types\VarDateTimeType;

class DateTimeType extends VarDateTimeType implements CarbonDoctrineType
{
/** @use CarbonTypeConverter<Carbon> */
use CarbonTypeConverter;
}
2 changes: 0 additions & 2 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public static function getLoader()
return self::$loader;
}

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInit687bd735fc487d23f01529fcf7aa762c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit687bd735fc487d23f01529fcf7aa762c', 'loadClassLoader'));
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f228d6f6e5d761bd25f6de4b464b58380ac15f78',
'reference' => '4b7ad46ae4a196a72a7062c80b458d33e07339fd',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'f228d6f6e5d761bd25f6de4b464b58380ac15f78',
'reference' => '4b7ad46ae4a196a72a7062c80b458d33e07339fd',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down

0 comments on commit fea745c

Please sign in to comment.