Add missing symfony/property-access dependency - #47
Conversation
WalkthroughAdded a new Composer dependency: symfony/property-access with version constraint ^6.4|^7.0 in composer.json’s require section. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
composer.json (2)
143-143: Optional: align Symfony constraint style for consistency.The require section mixes constraint formats (e.g., "^6.4|^7.1", "^6.4|^7.0", and "^6.4 || ^7.0"). Consider standardizing the style in a follow-up (not blocking). Keeping "^6.4|^7.0" here is fine.
143-143: Add a tiny smoke test to prevent regressions.A minimal test that instantiates the accessor would guard against accidental removal of the dependency and ensure the runtime path is exercised.
Example Pest test (place under packages/instructor/tests or examples’ tests):
<?php use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; it('can create a Symfony PropertyAccessor', function () { $pa = PropertyAccess::createPropertyAccessor(); expect($pa)->toBeInstanceOf(PropertyAccessorInterface::class); });I can open a follow-up PR adding this smoke test if you prefer.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
composer.json(1 hunks)
🔇 Additional comments (2)
composer.json (2)
143-143: Fix missing runtime dependency for PropertyAccess — good catch.Adding symfony/property-access resolves the "Class 'Symfony\Component\PropertyAccess\PropertyAccess' not found" error users hit when running the Ollama example. The constraint (^6.4|^7.0) is compatible with the rest of the Symfony stack in this repo and will resolve to 7.x given other requirements.
143-143: Please re-run the Ollama example end-to-end on a clean install.To verify the user-reported scenario is fully addressed, run a fresh clone + composer install and execute the Ollama example from the docs, ensuring no other missing packages surface.
|
Hey, property access is not included intentionally as Instructor works with 6.x and 7.x versions and some users still rely on 6.x. |
Hi there! I just installed Instructor and was experimenting with the Ollama example in the docs.
The example wouldn't run due to
Class "Symfony\Component\PropertyAccess\PropertyAccess" not found.Running
composer require symfony/property-accessfixed it and now it works perfectly, so this PR just adds the missing dependency in tocomposer.json.Thanks for an incredible package! 🙏
Summary by CodeRabbit