Comments (3)
@lifewcody Hi, I installed a clean installation of spiral/app (in the installer I selected the console application) and added the call to the example console command:
namespace App\Endpoint\Console;
use Spiral\Console\Attribute\AsCommand;
use Spiral\Console\Command;
#[AsCommand(name: 'do-nothing', description: 'The command does nothing.')]
final class DoNothing extends Command
{
public function perform(): int
{
$this->alert('test'); // <----
return self::SUCCESS;
}
}
And it worked correctly for me. Screenshot:
In the base class, in the execute
method on the 87 line, the prepareOutput
method is called, which for $this->output creates a SymfonyStyle object that has the desired method:
https://github.com/spiral/framework/blob/3.11.1/src/Console/src/Command.php#L87
Did you make any changes in your console command that might break this? Can you provide an example code for the console command that causes the error?
from framework.
I should have been more specific; It's only when calling confirmToProceed()
But then I'm not sure why alert works but not in confirmToProceed()
if (!$confirmation->confirmToProceed()) {
return self::FAILURE;
}
from framework.
Hi @lifewcody, thank you for the bug report! Yes, I was able to reproduce the problem. We will fix it soon.
from framework.
Related Issues (20)
- Fix runScoped in container
- Add buggregator/trap as a dependency of the spiral/dumper
- Translations do not end up in cache and used as keys HOT 3
- Add `scaffolder:info` Command for Enhanced Developer Experience
- PHP Attributes for Bootloader Methods HOT 1
- [Session] Mandatory FactoryInterface should be optional HOT 1
- MongoDB ODM HOT 8
- Проблема с Query Prepared Statement
- Disable error reporting by default
- Framework parts and add-ons HOT 2
- Embeddable Behaviors HOT 2
- route:list does not handle OPTIONS verb
- Stempler compiled templates php closing tag `?>` issue
- Add the new nest/carbon version into all the packages with carbon ^2x HOT 2
- Every Second Task Scheduling HOT 1
- Channel attribute for LoggerInterface HOT 3
- Extract package `spiral/interceptors` form `hmvc`
- Implementation of HTTP 103 (Early Hints)
- OpenTelemetry integration drops http.url, spams warning logs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework.