Skip to content

Commit d6f23ea

Browse files
authored
Fix: Move class into src/ (#581)
1 parent 98430db commit d6f23ea

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

bin/createNewsEntry

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<?php
33
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");
44

5-
require(__DIR__ . '/../include/news_entry.inc');
6-
use phpweb\news\Entry;
5+
require_once __DIR__ . '/../src/News/Entry.php';
6+
7+
use phpweb\News\Entry;
78

89
$imageRestriction = [
910
'width' => 400,

bin/createReleaseEntry

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<?php
33
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");
44

5-
require(__DIR__ . '/../include/news_entry.inc');
6-
use phpweb\news\Entry;
5+
require_once __DIR__ . '/../src/News/Entry.php';
6+
7+
use phpweb\News\Entry;
78

89
if (!file_exists(Entry::ARCHIVE_FILE_ABS)) {
910
fwrite(STDERR, "Can't find " . Entry::ARCHIVE_FILE_REL . ", are you sure you are in phpweb/?\n");

include/news_entry.inc renamed to src/News/Entry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace phpweb\news;
3+
namespace phpweb\News;
44

55
class Entry {
66
const CATEGORIES = [
@@ -11,7 +11,7 @@ class Entry {
1111
];
1212

1313
const WEBROOT = "https://www.php.net";
14-
const PHPWEB = __DIR__ . '/../';
14+
const PHPWEB = __DIR__ . '/../../';
1515
const ARCHIVE_FILE_REL = 'archive/archive.xml';
1616
const ARCHIVE_FILE_ABS = self::PHPWEB . self::ARCHIVE_FILE_REL;
1717
const ARCHIVE_ENTRIES_REL = 'archive/entries/';

0 commit comments

Comments
 (0)