Skip to content

Commit 688c72e

Browse files
committed
Merge branch '3.0' into 3
2 parents a2ef412 + 40864ac commit 688c72e

File tree

4 files changed

+0
-59
lines changed

4 files changed

+0
-59
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"php": "^8.3",
2323
"silverstripe/framework": "^6",
2424
"silverstripe/template-engine": "^1",
25-
"silverstripe/vendor-plugin": "^2",
2625
"symfony/filesystem": "^7.0",
2726
"intervention/image": "^3.9",
2827
"league/flysystem": "^3.29",

src/Shortcodes/ImageShortcodeProvider.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use SilverStripe\Assets\Image;
88
use SilverStripe\Core\Flushable;
99
use SilverStripe\Core\Injector\Injector;
10-
use SilverStripe\Dev\Deprecation;
1110
use SilverStripe\View\Parsers\ShortcodeHandler;
1211
use SilverStripe\View\Parsers\ShortcodeParser;
1312

@@ -150,28 +149,6 @@ public static function handle_shortcode($args, $content, $parser, $shortcode, $e
150149
return $markup;
151150
}
152151

153-
/**
154-
* Construct and return HTML image tag.
155-
*
156-
* @deprecated 2.3.0
157-
*/
158-
public static function createImageTag(array $attributes) : string
159-
{
160-
Deprecation::notice('2.3.0', 'Will be removed without equivalent functionality to replace it.');
161-
$preparedAttributes = '';
162-
foreach ($attributes as $attributeKey => $attributeValue) {
163-
if (strlen($attributeValue ?? '') > 0 || $attributeKey === 'alt') {
164-
$preparedAttributes .= sprintf(
165-
' %s="%s"',
166-
$attributeKey,
167-
htmlspecialchars($attributeValue ?? '', ENT_QUOTES, 'UTF-8', false)
168-
);
169-
}
170-
}
171-
172-
return "<img{$preparedAttributes} />";
173-
}
174-
175152
/**
176153
* Regenerates "[image id=n]" shortcode with new src attribute prior to being edited within the CMS.
177154
*

src/Storage/DBFile.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use SilverStripe\Control\Director;
99
use SilverStripe\Core\Injector\Injector;
1010
use SilverStripe\Forms\FormField;
11-
use SilverStripe\Dev\Deprecation;
1211
use SilverStripe\ORM\FieldType\DBComposite;
1312
use SilverStripe\Core\Validation\ValidationException;
1413
use SilverStripe\Core\Validation\ValidationResult;

tests/php/Shortcodes/ImageShortcodeProviderTest.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -472,40 +472,6 @@ public function testWhiteIsConfigurable()
472472
);
473473
}
474474

475-
public static function gettersAndSettersProvider(): array
476-
{
477-
return [
478-
'image without special characters' => [
479-
'<img src="http://example.com/image.jpg" alt="My alt text" title="My Title" width="300" height="200" class="leftAlone ss-htmleditorfield-file image" />',
480-
[
481-
'src' => 'http://example.com/image.jpg',
482-
'alt' => 'My alt text',
483-
'title' => 'My Title',
484-
'width' => '300',
485-
'height' => '200',
486-
'class' => 'leftAlone ss-htmleditorfield-file image',
487-
],
488-
],
489-
'image with special characters' => [
490-
'<img src="http://example.com/image.jpg" alt="My alt text &amp; special character" title="My Title &amp; special character" width="300" height="200" class="leftAlone ss-htmleditorfield-file image" />',
491-
[
492-
'src' => 'http://example.com/image.jpg',
493-
'alt' => 'My alt text &amp; special character',
494-
'title' => 'My Title & special character',
495-
'width' => '300',
496-
'height' => '200',
497-
'class' => 'leftAlone ss-htmleditorfield-file image',
498-
]
499-
]
500-
];
501-
}
502-
503-
#[DataProvider('gettersAndSettersProvider')]
504-
public function testCreateImageTag(string $expected, array $attributes)
505-
{
506-
$this->assertEquals($expected, ImageShortcodeProvider::createImageTag($attributes));
507-
}
508-
509475
/**
510476
* This method will assert that the $tag will contain an image with specific attributes and values
511477
*

0 commit comments

Comments
 (0)