Skip to content

Commit

Permalink
Merge pull request #580 from jolicode/more-stubs
Browse files Browse the repository at this point in the history
Add more missing vendor classes to stubs
  • Loading branch information
lyrixx authored Nov 24, 2024
2 parents b0332ae + 8d22d61 commit 342f4d8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Not released yet

### Fixes

Add more missing vendor classes into stubs

## 0.21.0 (2024-11-19)

### Features
Expand Down
1 change: 1 addition & 0 deletions src/ExpressionLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Symfony\Component\ExpressionLanguage\ExpressionFunction;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage as SymfonyExpressionLanguage;

/** @internal */
class ExpressionLanguage extends SymfonyExpressionLanguage
{
public function __construct(
Expand Down
1 change: 1 addition & 0 deletions src/Helper/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

use function Castor\context;

/** @internal */
class Notifier
{
public function __construct(
Expand Down
37 changes: 34 additions & 3 deletions src/Stub/StubsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,61 @@ private function generateCastorStubs(string $dest): void

// Add some very frequently used classes
$frequentlyUsedClasses = [
\Psr\Cache\CacheItemInterface::class,
\Psr\Cache\CacheItemPoolInterface::class,
\Psr\Cache\InvalidArgumentException::class,
\Psr\Cache\CacheException::class,
LoggerInterface::class,
\Symfony\Component\Console\Application::class,
\Symfony\Component\Console\Command\Command::class,
\Symfony\Component\Console\Completion\CompletionInput::class,
\Symfony\Component\Console\Helper\ProgressBar::class,
\Symfony\Component\Console\Helper\TableSeparator::class,
\Symfony\Component\Console\Helper\TableStyle::class,
\Symfony\Component\Console\Input\InputArgument::class,
\Symfony\Component\Console\Input\InputInterface::class,
\Symfony\Component\Console\Input\InputOption::class,
\Symfony\Component\Console\Output\OutputInterface::class,
\Symfony\Component\Console\Question\Question::class,
\Symfony\Component\Console\Style\SymfonyStyle::class,
\Symfony\Contracts\EventDispatcher\Event::class,
\Symfony\Component\EventDispatcher\EventDispatcherInterface::class,
\Symfony\Component\EventDispatcher\EventSubscriberInterface::class,
\Symfony\Component\Filesystem\Exception\ExceptionInterface::class,
\Symfony\Component\Filesystem\Exception\FileNotFoundException::class,
\Symfony\Component\Filesystem\Exception\InvalidArgumentException::class,
\Symfony\Component\Filesystem\Exception\IOException::class,
\Symfony\Component\Filesystem\Exception\RuntimeException::class,
\Symfony\Component\Filesystem\Filesystem::class,
\Symfony\Component\Filesystem\Path::class,
\Symfony\Component\Finder\Exception\DirectoryNotFoundException::class,
Finder::class,
\Symfony\Component\Finder\SplFileInfo::class,
\Symfony\Component\Process\Exception\ExceptionInterface::class,
\Symfony\Component\Process\Exception\LogicException::class,
\Symfony\Component\Process\Exception\ProcessFailedException::class,
\Symfony\Component\Process\Exception\ProcessSignaledException::class,
\Symfony\Component\Process\Exception\ProcessTimedOutException::class,
\Symfony\Component\Process\Exception\RuntimeException::class,
\Symfony\Component\Process\ExecutableFinder::class,
\Symfony\Component\Process\Process::class,
\Symfony\Contracts\HttpClient\Exception\ExceptionInterface::class,
\Symfony\Contracts\HttpClient\HttpClientInterface::class,
\Symfony\Contracts\HttpClient\ResponseInterface::class,
\Symfony\Component\String\AbstractString::class,
\Symfony\Component\String\AbstractUnicodeString::class,
\Symfony\Component\String\ByteString::class,
\Symfony\Component\String\CodePointString::class,
\Symfony\Component\String\Exception\ExceptionInterface::class,
\Symfony\Component\String\UnicodeString::class,
\Symfony\Contracts\Cache\CacheInterface::class,
\Symfony\Contracts\Cache\CallbackInterface::class,
\Symfony\Contracts\Cache\ItemInterface::class,
\Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface::class,
\Symfony\Contracts\HttpClient\Exception\ExceptionInterface::class,
\Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface::class,
\Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface::class,
\Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface::class,
\Symfony\Contracts\HttpClient\HttpClientInterface::class,
\Symfony\Contracts\HttpClient\ResponseInterface::class,
\Symfony\Contracts\HttpClient\ResponseStreamInterface::class,
];

foreach ($frequentlyUsedClasses as $class) {
Expand Down

0 comments on commit 342f4d8

Please sign in to comment.