Skip to content

Commit 6038811

Browse files
committed
fix: do not generate bundle files
1 parent 87437c8 commit 6038811

5 files changed

Lines changed: 67 additions & 186 deletions

File tree

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ All versions except pre-releases are proactively monitored for security vulenara
66

77
| Version | Supported |
88
| ------- | ------------------ |
9-
| 0.2.x | :white_check_mark: |
9+
| 0.2.x (Pre-Releases) | :white_check_mark: |
1010
| 0.1.x (Pre-Releases) | :x: |
1111

1212
## Reporting a Vulnerability
1313

14-
If you have detected a vulnearibilty please report it to iroybot@gmail.com.
14+
If you have detected a vulnearibilty please report it via Github's [Security Advisories](https://docs.github.com/en/code-security/security-advisories/security-advisories-about-github-security-advisories) feature.

src/Command/BatchGeneratorCommand.php

Lines changed: 0 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ public function __invoke(
140140
$this->io->success("Generated component class: {$componentFile}");
141141
}
142142
}
143-
144-
// Generate bundle files for twig-component
145-
if ($name === 'twig-component') {
146-
$this->generateBundleFiles($dest . \DIRECTORY_SEPARATOR . $name, $overwriteExisting);
147-
}
148143
}
149144
return Command::SUCCESS;
150145
}
@@ -176,151 +171,6 @@ private function loadHtmlDefinitions(?string $specificationPath): bool
176171
return true;
177172
}
178173

179-
private function generateBundleFiles(string $bundleDir, bool $overwrite): void
180-
{
181-
// Generate composer.json
182-
$composerJson = [
183-
'name' => 'vardumper/html5-ux-twig-component-bundle',
184-
'description' => 'Symfony UX Twig Components for typesafe HTML5 elements with ARIA support & enum validation',
185-
'type' => 'symfony-bundle',
186-
'license' => 'MIT',
187-
'keywords' => ['symfony', 'twig', 'components', 'html5', 'aria', 'ux'],
188-
'authors' => [
189-
[
190-
'name' => 'vardumper',
191-
'email' => 'info@erikpoehler.com',
192-
],
193-
],
194-
'require' => [
195-
'php' => '^8.2',
196-
'symfony/twig-bundle' => '^6.0|^7.0',
197-
'symfony/ux-twig-component' => '^2.0',
198-
'vardumper/extended-htmldocument' => '^0.2',
199-
],
200-
'autoload' => [
201-
'psr-4' => [
202-
'Html\\TwigComponentBundle\\' => 'src/',
203-
],
204-
],
205-
'extra' => [
206-
'symfony' => [
207-
'require' => '^6.0|^7.0',
208-
],
209-
],
210-
];
211-
212-
$composerFile = $bundleDir . \DIRECTORY_SEPARATOR . 'composer.json';
213-
if (! file_exists($composerFile) || $overwrite) {
214-
file_put_contents(
215-
$composerFile,
216-
json_encode($composerJson, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES) . "\n"
217-
);
218-
$this->io->success("Generated: {$composerFile}");
219-
}
220-
221-
// Generate HtmlComponentBundle.php
222-
$bundleClass = <<<'PHP'
223-
<?php
224-
225-
namespace Html\ComponentBundle;
226-
227-
use Symfony\Component\HttpKernel\Bundle\Bundle;
228-
229-
/**
230-
* HTML Component Bundle
231-
*
232-
* Provides Symfony UX Twig Components for all HTML5 elements with ARIA support.
233-
*
234-
* @author vardumper <info@erikpoehler.com>
235-
* @package Html\ComponentBundle
236-
*/
237-
class HtmlComponentBundle extends Bundle
238-
{
239-
public function getPath(): string
240-
{
241-
return \dirname(__DIR__);
242-
}
243-
}
244-
245-
PHP;
246-
247-
$bundleFile = $bundleDir . \DIRECTORY_SEPARATOR . 'src' . \DIRECTORY_SEPARATOR . 'HtmlComponentBundle.php';
248-
if (! file_exists($bundleFile) || $overwrite) {
249-
$bundleFileDir = dirname($bundleFile);
250-
if (! is_dir($bundleFileDir)) {
251-
mkdir($bundleFileDir, 0755, true);
252-
}
253-
file_put_contents($bundleFile, $bundleClass);
254-
$this->io->success("Generated: {$bundleFile}");
255-
}
256-
257-
// Generate README.md
258-
$readme = <<<'MD'
259-
# HTML Component Bundle
260-
261-
Symfony UX Twig Components for all HTML5 elements with ARIA support.
262-
263-
## Installation
264-
265-
```bash
266-
composer require html/component-bundle
267-
```
268-
269-
## Configuration
270-
271-
Register the bundle in `config/bundles.php`:
272-
273-
```php
274-
return [
275-
// ...
276-
Html\ComponentBundle\HtmlComponentBundle::class => ['all' => true],
277-
];
278-
```
279-
280-
## Usage
281-
282-
Use any HTML element as a Twig Component:
283-
284-
```twig
285-
<twig:Blockquote cite="https://example.com">
286-
This is a quote from example.com
287-
</twig:Blockquote>
288-
289-
<twig:Button role="button" type="submit">
290-
Submit Form
291-
</twig:Button>
292-
293-
<twig:Input type="email" name="email" required />
294-
```
295-
296-
## Features
297-
298-
- ✅ All HTML5 elements supported
299-
- ✅ Full ARIA attributes support
300-
- ✅ Type-safe enum validation
301-
- ✅ PreMount validation with OptionsResolver
302-
- ✅ Proper namespace structure (Block/Inline/Void)
303-
304-
## Components Structure
305-
306-
Components are organized by type:
307-
- `Block` - Block-level elements (div, section, article, etc.)
308-
- `Inline` - Inline elements (span, a, strong, etc.)
309-
- `Void` - Self-closing elements (img, input, br, etc.)
310-
311-
## License
312-
313-
MIT
314-
315-
MD;
316-
317-
$readmeFile = $bundleDir . \DIRECTORY_SEPARATOR . 'README.md';
318-
if (! file_exists($readmeFile) || $overwrite) {
319-
file_put_contents($readmeFile, $readme);
320-
$this->io->success("Generated: {$readmeFile}");
321-
}
322-
}
323-
324174
/**
325175
* Get safe component class name, avoiding PHP reserved words
326176
*/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These are supported funding model platforms
2+
3+
github: [vardumper]
4+
buy_me_a_coffee: vardumper
5+
custom: ['https://paypal.me/vardumper']
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
9+
# Maintain dependencies for GitHub Actions
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"
14+
15+
# Maintain dependencies for npm
16+
- package-ecosystem: "npm"
17+
directory: "/"
18+
schedule:
19+
interval: "monthly"
20+
21+
# Maintain dependencies for Composer
22+
- package-ecosystem: "composer"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
{
2-
"name": "vardumper/html5-ux-twig-component-bundle",
3-
"description": "Symfony UX Twig Components for typesafe HTML5 elements with ARIA support & enum validation",
4-
"type": "symfony-bundle",
5-
"license": "MIT",
6-
"keywords": [
7-
"symfony",
8-
"twig",
9-
"components",
10-
"html5",
11-
"aria",
12-
"ux"
13-
],
14-
"authors": [
15-
{
16-
"name": "vardumper",
17-
"email": "info@erikpoehler.com"
18-
}
19-
],
20-
"require": {
21-
"php": "^8.2",
22-
"symfony/twig-bundle": "^6.0|^7.0",
23-
"symfony/ux-twig-component": "^2.0",
24-
"vardumper/extended-htmldocument": "^0.2"
25-
},
26-
"autoload": {
27-
"psr-4": {
28-
"Html\\TwigComponentBundle\\": "src/"
29-
}
30-
},
31-
"extra": {
32-
"symfony": {
33-
"require": "^6.0|^7.0"
34-
}
2+
"name": "vardumper/html5-twig-component-bundle",
3+
"description": "Symfony UX Twig Components for typesafe HTML5 elements with ARIA support & enum validation",
4+
"type": "symfony-bundle",
5+
"license": "MIT",
6+
"keywords": [
7+
"symfony",
8+
"twig",
9+
"components",
10+
"html5",
11+
"aria",
12+
"symfony-ux"
13+
],
14+
"authors": [
15+
{
16+
"name": "vardumper",
17+
"email": "info@erikpoehler.com"
3518
}
36-
}
19+
],
20+
"require": {
21+
"php": "^8.4",
22+
"symfony/twig-bundle": "^6.0|^7.0",
23+
"symfony/ux-twig-component": "^2.0",
24+
"vardumper/extended-htmldocument": "^0.2"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"Html\\TwigComponentBundle\\": "src/"
29+
}
30+
},
31+
"extra": {
32+
"symfony": {
33+
"require": "^6.0|^7.0"
34+
}
35+
},
36+
"version": "0.2.31"
37+
}

0 commit comments

Comments
 (0)