Skip to content

Commit 86c5b47

Browse files
soyukadunglas
andauthored
Update update-hydra-context.php
Co-authored-by: Kévin Dunglas <[email protected]>
1 parent a7e14dc commit 86c5b47

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

update-hydra-context.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,15 @@
2020

2121
$context = stream_context_create($opts);
2222
$hydraContext = json_decode(file_get_contents('http://www.w3.org/ns/hydra/context.jsonld', false, $context), true);
23-
$file = fopen('src/JsonLd/HydraContext.php', 'w');
24-
25-
$str = "<?php
26-
27-
declare(strict_types=1);
23+
file_put_contents('src/JsonLd/HydraContext.php', '<?php
2824
2925
/*
30-
* This file is part of the API Platform project.
31-
*
32-
* (c) Kévin Dunglas <[email protected]>
33-
*
34-
* For the full copyright and license information, please view the LICENSE
35-
* file that was distributed with this source code.
26+
* This is an autogenerated file, DO NOT MODIFY IT.
27+
* Run the update-hydra-contex.php script at the root of the project to refresh it.
3628
*/
3729
38-
namespace ApiPlatform\JsonLd;
30+
declare(strict_types=1);
3931
40-
const HYDRA_CONTEXT = ".var_export($hydraContext, true).';';
32+
namespace ApiPlatform\JsonLd;
4133
42-
fwrite($file, $str);
43-
fclose($file);
34+
const HYDRA_CONTEXT = '.var_export($hydraContext, true).';';

0 commit comments

Comments
 (0)