Skip to content

fix: handle case when no documents are found in configuration #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 26, 2025

Conversation

butschster
Copy link
Collaborator

[ErrorException]
foreach() argument must be of type array|object, null given
in phar:///usr/local/bin/ctx/src/Console/GenerateCommand.php:101

@butschster butschster added bug Something isn't working console:cli Console commands and CLI interface document:compiler Document transformation and output compilation labels Apr 26, 2025
@butschster butschster added this to the 1.27 milestone Apr 26, 2025
@butschster butschster self-assigned this Apr 26, 2025
Copy link

codecov bot commented Apr 26, 2025

@butschster butschster moved this to In progress in Context Generator Apr 26, 2025
@butschster butschster requested a review from Copilot April 26, 2025 14:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue where an error was thrown when no documents were found in the configuration by ensuring that test fixtures exist and updating workflow configurations for proper PHP extension support.

  • Added YAML fixtures for document configuration handling ("basic", "filtered", and "content-filter").
  • Updated GitHub workflow configuration files to include the "fileinfo" PHP extension.

Reviewed Changes

Copilot reviewed 44 out of 57 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/fixtures/Console/GenerateCommand/FileSource/filtered.yaml Added fixture for filtered file source test
tests/fixtures/Console/GenerateCommand/FileSource/content-filter.yaml Added fixture for testing content filtering
tests/fixtures/Console/GenerateCommand/FileSource/basic.yaml Added basic file source test fixture
.github/workflows/testing.yml Updated PHP extensions by adding "fileinfo"
.github/workflows/static-analysis.yml Updated PHP extensions by adding "fileinfo"
.github/workflows/security.yml Updated PHP extensions by adding "fileinfo"
.github/workflows/refactoring.yml Updated PHP extensions by adding "fileinfo"
Files not reviewed (13)
  • composer.json: Language not supported
  • src/Application/Bootloader/VariableBootloader.php: Language not supported
  • src/Config/Import/Source/Url/UrlImportSource.php: Language not supported
  • src/Config/Reader/YamlReader.php: Language not supported
  • src/Console/GenerateCommand.php: Language not supported
  • src/Directories.php: Language not supported
  • src/DirectoriesInterface.php: Language not supported
  • src/Document/Compiler/CompiledDocument.php: Language not supported
  • src/Document/Compiler/DocumentCompiler.php: Language not supported
  • src/McpServer/Console/MCPServerCommand.php: Language not supported
  • src/McpServer/Prompt/Extension/TemplateResolver.php: Language not supported
  • src/McpServer/Prompt/PromptRegistry.php: Language not supported
  • tests/fixtures/Console/GenerateCommand/FileSource/TestClass.php: Language not supported

@butschster butschster merged commit 9d06d01 into main Apr 26, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Context Generator Apr 26, 2025
@butschster butschster deleted the hotifx/generate-command branch April 26, 2025 17:30
@butschster butschster linked an issue Apr 29, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working console:cli Console commands and CLI interface document:compiler Document transformation and output compilation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

error on windows 11
1 participant