Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Core Laravel Package

draw/core

Core utilities for Draw components/bundles. Provides reusable shared code and automatically registers missing Draw-namespaced Doctrine annotations as ignored to prevent annotation reader errors when optional annotation libraries aren’t installed.

View on GitHub
Deep Wiki
Context7

[READ-ONLY] Core repository for draw component/bundle

Frequently asked questions about Core
How does draw/core prevent Doctrine annotation reader errors in Laravel when optional annotation libraries are missing?
draw/core automatically detects Draw-namespaced annotations that aren’t installed (via config-driven rules) and registers them as ignored. This prevents Doctrine’s AnnotationReader from throwing errors when optional annotation dependencies are absent, ensuring smooth operation in Laravel apps using Doctrine ORM or Symfony bridges.
Can I use draw/core in a Laravel project without Doctrine annotations?
Yes, but it’s optional. The package focuses on annotation handling, so if your Laravel app doesn’t use Doctrine annotations (e.g., relies on PHP 8 attributes or XML/YAML configs), you can skip it. However, it provides shared utilities for Draw components, which may still be useful if you’re integrating with the Draw ecosystem.
What Laravel versions does draw/core support?
The package is designed for Laravel 8+ and works alongside Doctrine ORM or Symfony bridges commonly used in Laravel. Since it’s part of the Draw ecosystem, compatibility depends on the Draw components you’re using. Check the Draw documentation for specific version requirements.
How do I configure draw/core to ignore specific Draw annotations?
Edit the `ignore_annotations.php` config file to define which Draw-namespaced annotations should be ignored. The package uses this file to dynamically register ignored annotations with Doctrine’s AnnotationReader, so no additional code changes are needed unless you customize the behavior.
Is draw/core compatible with Laravel’s service container?
Yes, the package is modular and can be bootstrapped via a custom Laravel Service Provider (e.g., `DrawCoreServiceProvider`). This allows you to leverage Laravel’s dependency injection and binding mechanisms, ensuring clean integration with your existing app architecture.
What are the risks of using draw/core if my team isn’t familiar with the Draw ecosystem?
The main risks are potential version conflicts with Doctrine or Draw components and the lack of Laravel-specific documentation. Since the package is foundational for Draw, its long-term viability depends on the ecosystem’s growth. Test thoroughly in staging and consider gating it behind a feature flag if unsure.
Are there alternatives to draw/core for handling missing Doctrine annotations in Laravel?
Yes, you could manually configure Doctrine’s AnnotationReader to ignore specific annotations or use Symfony’s `AnnotationRegistry` directly. However, draw/core automates this for Draw-namespaced annotations, reducing boilerplate. For Laravel-specific solutions, consider packages like `spatie/laravel-activitylog` or custom service providers.
How do I test draw/core’s annotation handling in my Laravel app?
Write unit tests to verify that ignored annotations don’t interfere with Doctrine’s parsing. Use Laravel’s testing tools to mock the AnnotationReader and check that your app’s ORM mappings, validation rules, or custom metadata remain intact. The package’s config-driven approach makes it easier to test edge cases.
Will draw/core work with PHP 8 attributes instead of Doctrine annotations?
No, draw/core is specifically designed for Doctrine annotations. If you’re migrating to PHP 8 attributes (e.g., for Laravel’s native attribute-based features), you’ll need to replace annotation logic with attributes or other configurations. The package isn’t a drop-in solution for attribute-based workflows.
How do I integrate draw/core into an existing Laravel project?
Add the package via Composer (`composer require draw/core`), then bootstrap it using a Laravel Service Provider. If your app uses Doctrine, the package will automatically handle ignored annotations. For non-Doctrine apps, you can conditionally load it or use its shared utilities without annotation features.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo