Skip to content

Commit

Permalink
Fixes in Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebowczyk committed Mar 16, 2024
1 parent 0a6a7e0 commit c7e695d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
1 change: 0 additions & 1 deletion docs/hub/partial_updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ response is received.

```php
<?php
sleep(3);
$loader = require 'vendor/autoload.php';
$loader->add('Cognesy\\Instructor\\', __DIR__ . '../../src/');

Expand Down
1 change: 0 additions & 1 deletion examples/PartialUpdates/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

```php
<?php
sleep(3);
$loader = require 'vendor/autoload.php';
$loader->add('Cognesy\\Instructor\\', __DIR__ . '../../src/');

Expand Down
17 changes: 1 addition & 16 deletions src-hub/Services/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ public function __construct(
///////////////////////////////////////////////////////////////////////////////////////////////////

public function runSingle(Example $example) : void {
//$this->runFile($example);
$this->executeAndShow($example->runPath);
//$this->displayErrors();
include $example->runPath;
}

public function runAll() : void {
Expand Down Expand Up @@ -63,19 +61,6 @@ private function execute(string $runPath) : string {
return $output . $bufferedOutput;
}

private function executeAndShow(string $runPath) : void {
//ob_start();
try {
$command = 'php ' . $runPath;// . ' 2>&1';
$output = shell_exec($command);
} catch (Exception $e) {
$output = $e->getMessage();
}
//$bufferedOutput = ob_get_contents();
//ob_end_clean();
//return $output . $bufferedOutput;
}

private function processOutput(string $output, Example $example) : bool {
Cli::grid([[1, ">", STR_PAD_RIGHT, Color::DARK_GRAY]]);
if (strpos($output, 'Fatal error') !== false) {
Expand Down

0 comments on commit c7e695d

Please sign in to comment.