Skip to content

Commit 2d1b619

Browse files
committed
update:升级依赖
1 parent f5bb2b8 commit 2d1b619

File tree

14 files changed

+147
-121
lines changed

14 files changed

+147
-121
lines changed

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"doctrine/orm": "^2.8",
1313
"phpdocumentor/reflection-docblock": "^5.2",
1414
"phpzlc/admin-business": "^1.0",
15-
"phpzlc/phpzlc": "^1.0",
15+
"phpzlc/phpzlc": "1.0.21",
1616
"sensio/framework-extra-bundle": "^5.1",
1717
"symfony/asset": "4.4.*",
1818
"symfony/console": "4.4.*",
@@ -92,8 +92,9 @@
9292
},
9393
"extra": {
9494
"symfony": {
95-
"allow-contrib": false,
96-
"require": "4.4.*"
95+
"allow-contrib": true,
96+
"require": "4.4.*",
97+
"endpoint": "http://127.0.0.1:8000"
9798
}
9899
}
99100
}

composer.lock

Lines changed: 6 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/composer/installed.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,17 +2694,17 @@
26942694
},
26952695
{
26962696
"name": "phpzlc/phpzlc",
2697-
"version": "v1.0.8",
2698-
"version_normalized": "1.0.8.0",
2697+
"version": "v1.0.21",
2698+
"version_normalized": "1.0.21.0",
26992699
"source": {
27002700
"type": "git",
27012701
"url": "https://github.com/phpzlc/phpzlc.git",
2702-
"reference": "05ad7fb0b82323eea47a73e408e24210dbbcad65"
2702+
"reference": "4e6faf6843e435f4e8cb166f0ec73cb00cd0807b"
27032703
},
27042704
"dist": {
27052705
"type": "zip",
2706-
"url": "https://api.github.com/repos/phpzlc/phpzlc/zipball/05ad7fb0b82323eea47a73e408e24210dbbcad65",
2707-
"reference": "05ad7fb0b82323eea47a73e408e24210dbbcad65",
2706+
"url": "https://api.github.com/repos/phpzlc/phpzlc/zipball/4e6faf6843e435f4e8cb166f0ec73cb00cd0807b",
2707+
"reference": "4e6faf6843e435f4e8cb166f0ec73cb00cd0807b",
27082708
"shasum": ""
27092709
},
27102710
"require": {
@@ -2716,7 +2716,7 @@
27162716
"ramsey/uuid": "^4.1",
27172717
"symfony/framework-bundle": "4.4.*"
27182718
},
2719-
"time": "2021-03-12T02:49:08+00:00",
2719+
"time": "2021-05-14T03:49:47+00:00",
27202720
"type": "library",
27212721
"installation-source": "dist",
27222722
"autoload": {
@@ -2741,12 +2741,7 @@
27412741
"keywords": [
27422742
"phpzlc",
27432743
"symfony"
2744-
],
2745-
"support": {
2746-
"email": "1044295598@qq.com",
2747-
"issues": "https://github.com/phpzlc/phpzlc/issues",
2748-
"source": "https://github.com/phpzlc/phpzlc/tree/v1.0.8"
2749-
}
2744+
]
27502745
},
27512746
{
27522747
"name": "phpzlc/platform-business",

vendor/composer/package-versions-deprecated/src/PackageVersions/Versions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ final class Versions
6868
'phpzlc/auth-business' => 'v1.0.2@1e475373cdaefdbced8abd75b2662d2d16121c07',
6969
'phpzlc/captcha-business' => 'v1.0.1@19df681742059e2ff8c07f19f8ea895d59d28d00',
7070
'phpzlc/document-bundle' => 'v1.1.0@4f4fc5665c5b465aa13f5e9b5b05b207c7bebac8',
71-
'phpzlc/phpzlc' => 'v1.0.8@05ad7fb0b82323eea47a73e408e24210dbbcad65',
71+
'phpzlc/phpzlc' => 'v1.0.21@4e6faf6843e435f4e8cb166f0ec73cb00cd0807b',
7272
'phpzlc/platform-business' => 'v1.0.2@e7e8501aa298622830da0682f247986a889ca68e',
7373
'phpzlc/upload' => 'v1.0.0@f6edc9f63d88e077d258d781f5588da6a02c1a30',
7474
'phpzlc/upload-business' => 'v1.0.0@fc84916b50795474e036927f0e7ed0538cc915ea',
@@ -150,13 +150,13 @@ final class Versions
150150
'symfony/maker-bundle' => 'v1.30.1@4021ece4955286e0816a34b3d545bf1a917afb0f',
151151
'symfony/phpunit-bridge' => 'v5.2.4@9d85d900c1afe29138a0d5854505eb684bc3ac6d',
152152
'symfony/web-profiler-bundle' => 'v4.4.20@2a5eeaa950e5702738437c6c8f442eca46ffc0c5',
153-
'paragonie/random_compat' => '2.*@d4e93f817ccc471e7292b872bc772a5c37baffea',
154-
'symfony/polyfill-ctype' => '*@d4e93f817ccc471e7292b872bc772a5c37baffea',
155-
'symfony/polyfill-iconv' => '*@d4e93f817ccc471e7292b872bc772a5c37baffea',
156-
'symfony/polyfill-php71' => '*@d4e93f817ccc471e7292b872bc772a5c37baffea',
157-
'symfony/polyfill-php70' => '*@d4e93f817ccc471e7292b872bc772a5c37baffea',
158-
'symfony/polyfill-php56' => '*@d4e93f817ccc471e7292b872bc772a5c37baffea',
159-
'__root__' => 'dev-master@d4e93f817ccc471e7292b872bc772a5c37baffea',
153+
'paragonie/random_compat' => '2.*@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
154+
'symfony/polyfill-ctype' => '*@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
155+
'symfony/polyfill-iconv' => '*@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
156+
'symfony/polyfill-php71' => '*@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
157+
'symfony/polyfill-php70' => '*@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
158+
'symfony/polyfill-php56' => '*@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
159+
'__root__' => 'dev-master@f5bb2b81f913d6423c0d9b0229fb2e4169583e72',
160160
);
161161

162162
private function __construct()

vendor/phpzlc/phpzlc/Bundle/Business/AbstractBusiness.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
abstract class AbstractBusiness extends AbstractController
1919
{
20-
protected $em;
20+
public $em;
2121

2222
/**
2323
* @var Connection
2424
*/
25-
protected $conn;
25+
public $conn;
2626

2727
/**
2828
* @var ValidatorInterface
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/**
3+
* PhpStorm.
4+
* User: Jay
5+
* Date: 2018/4/20
6+
*/
7+
8+
namespace PHPZlc\PHPZlc\Bundle\Command;
9+
10+
11+
use Symfony\Component\Console\Command\Command;
12+
use Symfony\Component\Console\Input\InputInterface;
13+
use Symfony\Component\Console\Output\OutputInterface;
14+
use Symfony\Component\Console\Style\SymfonyStyle;
15+
16+
abstract class Base extends Command
17+
{
18+
/**
19+
* @var SymfonyStyle
20+
*/
21+
protected $io;
22+
23+
protected $command_pre = 'phpzlc:';
24+
25+
protected $description_pre = '[phpzlc] ';
26+
27+
protected function getRootPath()
28+
{
29+
return dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))));
30+
}
31+
32+
protected function interact(InputInterface $input, OutputInterface $output)
33+
{
34+
parent::interact($input, $output); // TODO: Change the autogenerated stub
35+
36+
$this->io = new SymfonyStyle($input, $output);
37+
}
38+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
/**
3+
* PhpStorm.
4+
* User: Jay
5+
* Date: 2018/5/2
6+
*/
7+
8+
namespace PHPZlc\PHPZlc\Bundle\Command;
9+
10+
11+
use MongoDB\Driver\Command;
12+
use Symfony\Component\Console\Input\InputInterface;
13+
use Symfony\Component\Console\Output\OutputInterface;
14+
use Symfony\Component\Filesystem\Filesystem;
15+
16+
class InstallCommand extends Base
17+
{
18+
private $configs = [
19+
"phpzlc/phpzlc/Doctrine/ORM/Rewrite/Templates/Repository.tpl.php" => "symfony/maker-bundle/src/Resources/skeleton/doctrine/Repository.tpl.php",
20+
"phpzlc/phpzlc/Doctrine/ORM/Rewrite/Hydration/ObjectHydrator.php"=> "doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php",
21+
"phpzlc/phpzlc/Doctrine/ORM/Rewrite/MakeEntityRegenerate/ClassSourceManipulator.php" => "symfony/maker-bundle/src/Util/ClassSourceManipulator.php",
22+
"phpzlc/phpzlc/Doctrine/ORM/Rewrite/MakeEntityRegenerate/EntityRegenerator.php" => "symfony/maker-bundle/src/Doctrine/EntityRegenerator.php"
23+
];
24+
25+
public function configure()
26+
{
27+
$this
28+
->setName($this->command_pre . 'install')
29+
->setDescription($this->description_pre . '安装');
30+
;
31+
}
32+
33+
public function execute(InputInterface $input, OutputInterface $output)
34+
{
35+
$filesystem = new Filesystem();
36+
37+
foreach ($this->configs as $originFile => $targetFile)
38+
{
39+
$originFile = $this->getRootPath() . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR. $originFile;
40+
$targetFile = $this->getRootPath() . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR. $targetFile;
41+
42+
$filesystem->copy($originFile, $targetFile);
43+
44+
$this->io->success('内核拷贝'. $originFile . '=>' . $targetFile );
45+
46+
}
47+
48+
$this->io->success('安装成功');
49+
50+
return 0;
51+
}
52+
}
53+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use PHPZlc\PHPZlc\Responses\Responses;
1313
use Throwable;
1414

15-
class PhpZlcApiException extends PHPZlcException
15+
class ApiException extends PHPZlcException
1616
{
1717
private $data;
1818

@@ -28,12 +28,12 @@ public function getType()
2828
return $this->type;
2929
}
3030

31-
public function __construct($msg, $code = '$_ENV[API_ERROR_CODE]def(1)', $data = [], $type = Responses::RESPONSE_JSON, Throwable $previous = null)
31+
public function __construct($msg, $code = '$_ENV[API_ERROR_CODE]def(1)', $data = [], $type = Responses::RESPONSE_JSON, Throwable $previous = null)
3232
{
3333
if($code == '$_ENV[API_ERROR_CODE]def(1)'){
3434
$code = Responses::getEnvValue('API_ERROR_CODE', 1);
3535
}
36-
36+
3737
parent::__construct($msg, $code, $previous);
3838

3939
$this->data = $data;

vendor/phpzlc/phpzlc/Bundle/EventListener/ApiExceptionListener/ApiExceptionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(ContainerInterface $container)
3030
public function onKernelException(ExceptionEvent $event)
3131
{
3232
// API 主动抛出返回响应
33-
if($event->getThrowable() instanceof PhpZlcApiException){
33+
if($event->getThrowable() instanceof ApiException){
3434
$event->setResponse(Responses::error(
3535
$event->getThrowable()->getMessage(),
3636
$event->getThrowable()->getCode(),
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
services:
22
phpzlc.file_system:
3-
class: PHPZlc\PHPZlc\Bundle\Service\FileSystem\FileSystem
3+
class: PHPZlc\PHPZlc\Bundle\Service\FileSystem\FileSystem
4+
5+
phpzlc.listener.api_exception:
6+
class: PHPZlc\PHPZlc\Bundle\EventListener\ApiExceptionListener\ApiExceptionListener
7+
arguments: ['@service_container']
8+
tags:
9+
- { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
10+
11+
phpzlc.command.install:
12+
class: PHPZlc\PHPZlc\Bundle\Command\InstallCommand
13+
tags: [console.command]

0 commit comments

Comments
 (0)