Skip to content

Commit 9f8a725

Browse files
DevKit updates for 4.x branch (#922)
* DevKit updates * Fix docs --------- Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
1 parent 60ac725 commit 9f8a725

5 files changed

Lines changed: 43 additions & 285 deletions

File tree

.github/workflows/documentation.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,11 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v3
2828

29-
- name: Set up Python 3.7
30-
uses: actions/setup-python@v2
29+
- name: Set up Python 3.11
30+
uses: actions/setup-python@v4
3131
with:
32-
python-version: '3.7'
33-
34-
- name: Display Python version
35-
run: python -c "import sys; print(sys.version)"
36-
37-
- name: Cache pip
38-
uses: actions/cache@v3
39-
with:
40-
path: ~/.cache/pip
41-
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
42-
restore-keys: ${{ runner.os }}-pip-
32+
python-version: '3.11'
33+
cache: 'pip'
4334

4435
- name: Install custom requirements via pip
4536
run: pip install -r docs/requirements.txt

.readthedocs.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
# DO NOT EDIT THIS FILE!
2+
#
3+
# It's auto-generated by sonata-project/dev-kit package.
4+
15
version: 2
26

37
sphinx:
48
builder: dirhtml
59
configuration: docs/conf.py
610

11+
build:
12+
os: ubuntu-22.04
13+
tools:
14+
python: '3.11'
15+
716
python:
8-
version: '3.7'
917
install:
1018
- requirements: docs/requirements.txt

docs/conf.py

Lines changed: 3 additions & 240 deletions
Original file line numberDiff line numberDiff line change
@@ -4,261 +4,24 @@
44
#
55
# It's auto-generated by sonata-project/dev-kit package.
66

7-
# IoC documentation build configuration file, created by
8-
# sphinx-quickstart on Fri Mar 29 01:43:00 2013.
9-
#
10-
# This file is execfile()d with the current directory set to its containing dir.
11-
#
12-
# Note that not all possible configuration values are present in this
13-
# autogenerated file.
14-
#
15-
# All configuration values have a default; values that are commented out
16-
# serve to show the default.
17-
18-
import sys, os
19-
20-
# If extensions (or modules to document with autodoc) are in another directory,
21-
# add these directories to sys.path here. If the directory is relative to the
22-
# documentation root, use os.path.abspath to make it absolute, like shown here.
23-
#sys.path.insert(0, os.path.abspath('.'))
24-
25-
# adding PhpLexer
267
from sphinx.highlighting import lexers
278
from pygments.lexers.web import PhpLexer
289

29-
# -- General configuration -----------------------------------------------------
30-
31-
# If your documentation needs a minimal Sphinx version, state it here.
32-
needs_sphinx = '1.8.5'
33-
34-
# Add any Sphinx extension module names here, as strings. They can be extensions
35-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
36-
extensions = [
37-
'sensio.sphinx.codeblock', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode'
38-
]
39-
40-
# Add any paths that contain templates here, relative to this directory.
10+
extensions = ['sphinx_rtd_theme']
4111
templates_path = ['_templates']
42-
43-
# The suffix of source filenames.
4412
source_suffix = '.rst'
45-
46-
# The encoding of source files.
47-
#source_encoding = 'utf-8-sig'
48-
49-
# The master toctree document.
5013
master_doc = 'index'
51-
52-
# General information about the project.
53-
project = u'SonataClassificationBundle'
54-
copyright = u'2010-2021, Thomas Rabaix'
55-
56-
# The version info for the project you're documenting, acts as replacement for
57-
# |version| and |release|, also used in various other places throughout the
58-
# built documents.
59-
#
60-
# The short X.Y version.
61-
#version = '0.0.1'
62-
# The full version, including alpha/beta/rc tags.
63-
#release = '0.0.1'
64-
65-
# The language for content autogenerated by Sphinx. Refer to documentation
66-
# for a list of supported languages.
67-
#language = None
68-
69-
# There are two options for replacing |today|: either, you set today to some
70-
# non-false value, then it is used:
71-
#today = ''
72-
# Else, today_fmt is used as the format for a strftime call.
73-
#today_fmt = '%B %d, %Y'
74-
75-
# List of patterns, relative to source directory, that match files and
76-
# directories to ignore when looking for source files.
14+
project = u'SonataAdminBundle'
15+
copyright = u'2010, Thomas Rabaix'
7716
exclude_patterns = ['_build']
78-
79-
# The reST default role (used for this markup: `text`) to use for all documents.
80-
#default_role = None
81-
82-
# If true, '()' will be appended to :func: etc. cross-reference text.
83-
#add_function_parentheses = True
84-
85-
# If true, the current module name will be prepended to all description
86-
# unit titles (such as .. function::).
87-
#add_module_names = True
88-
89-
# If true, sectionauthor and moduleauthor directives will be shown in the
90-
# output. They are ignored by default.
91-
#show_authors = False
92-
93-
# The name of the Pygments (syntax highlighting) style to use.
94-
pygments_style = 'sphinx'
95-
96-
# This will be used when using the shorthand notation
9717
highlight_language = 'php'
9818

99-
# A list of ignored prefixes for module index sorting.
100-
#modindex_common_prefix = []
101-
102-
# -- Settings for symfony doc extension ---------------------------------------------------
103-
104-
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
10519
lexers['php'] = PhpLexer(startinline=True)
10620
lexers['php-annotations'] = PhpLexer(startinline=True)
10721
lexers['php-attributes'] = PhpLexer(startinline=True)
10822
lexers['php-standalone'] = PhpLexer(startinline=True)
10923
lexers['php-symfony'] = PhpLexer(startinline=True)
11024

111-
# -- Options for HTML output ---------------------------------------------------
112-
import sphinx_rtd_theme
113-
114-
# The theme to use for HTML and HTML Help pages. See the documentation for
115-
# a list of builtin themes.
11625
html_theme = 'sphinx_rtd_theme'
117-
118-
# Theme options are theme-specific and customize the look and feel of a theme
119-
# further. For a list of options available for each theme, see the
120-
# documentation.
121-
#html_theme_options = {}
122-
123-
# Add any paths that contain custom themes here, relative to this directory.
124-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
125-
126-
# The name for this set of Sphinx documents. If None, it defaults to
127-
# "<project> v<release> documentation".
128-
#html_title = None
129-
130-
# A shorter title for the navigation bar. Default is the same as html_title.
131-
#html_short_title = None
132-
133-
# The name of an image file (relative to this directory) to place at the top
134-
# of the sidebar.
135-
#html_logo = None
136-
137-
# The name of an image file (within the static path) to use as favicon of the
138-
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
139-
# pixels large.
140-
#html_favicon = None
141-
142-
# Add any paths that contain custom static files (such as style sheets) here,
143-
# relative to this directory. They are copied after the builtin static files,
144-
# so a file named "default.css" will overwrite the builtin "default.css".
14526
html_static_path = ['_static']
146-
147-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
148-
# using the given strftime format.
149-
#html_last_updated_fmt = '%b %d, %Y'
150-
151-
# If true, SmartyPants will be used to convert quotes and dashes to
152-
# typographically correct entities.
153-
#html_use_smartypants = True
154-
155-
# Custom sidebar templates, maps document names to template names.
156-
#html_sidebars = {}
157-
158-
# Additional templates that should be rendered to pages, maps page names to
159-
# template names.
160-
#html_additional_pages = {}
161-
162-
# If false, no module index is generated.
163-
#html_domain_indices = True
164-
165-
# If false, no index is generated.
166-
#html_use_index = True
167-
168-
# If true, the index is split into individual pages for each letter.
169-
#html_split_index = False
170-
171-
# If true, links to the reST sources are added to the pages.
172-
#html_show_sourcelink = True
173-
174-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
175-
#html_show_sphinx = True
176-
177-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
178-
#html_show_copyright = True
179-
180-
# If true, an OpenSearch description file will be output, and all pages will
181-
# contain a <link> tag referring to it. The value of this option must be the
182-
# base URL from which the finished HTML is served.
183-
#html_use_opensearch = ''
184-
185-
# This is the file name suffix for HTML files (e.g. ".xhtml").
186-
#html_file_suffix = None
187-
188-
# Output file base name for HTML help builder.
18927
htmlhelp_basename = 'doc'
190-
191-
192-
# -- Options for LaTeX output --------------------------------------------------
193-
194-
latex_elements = {
195-
# The paper size ('letterpaper' or 'a4paper').
196-
#'papersize': 'letterpaper',
197-
198-
# The font size ('10pt', '11pt' or '12pt').
199-
#'pointsize': '10pt',
200-
201-
# Additional stuff for the LaTeX preamble.
202-
#'preamble': '',
203-
}
204-
205-
# Grouping the document tree into LaTeX files. List of tuples
206-
# (source start file, target name, title, author, documentclass [howto/manual]).
207-
#latex_documents = [
208-
# ('index', 'PythonElement.tex', u'Python Documentation',
209-
# u'Thomas Rabaix', 'manual'),
210-
#]
211-
212-
# The name of an image file (relative to this directory) to place at the top of
213-
# the title page.
214-
#latex_logo = None
215-
216-
# For "manual" documents, if this is true, then toplevel headings are parts,
217-
# not chapters.
218-
#latex_use_parts = False
219-
220-
# If true, show page references after internal links.
221-
#latex_show_pagerefs = False
222-
223-
# If true, show URL addresses after external links.
224-
#latex_show_urls = False
225-
226-
# Documents to append as an appendix to all manuals.
227-
#latex_appendices = []
228-
229-
# If false, no module index is generated.
230-
#latex_domain_indices = True
231-
232-
233-
# -- Options for manual page output --------------------------------------------
234-
235-
# One entry per manual page. List of tuples
236-
#(source start file, name, description, authors, manual section).
237-
#man_pages = [
238-
# ('index', 'ioc', u'IoC Documentation',
239-
# [u'Thomas Rabaix'], 1)
240-
#]
241-
242-
# If true, show URL addresses after external links.
243-
#man_show_urls = False
244-
245-
246-
# -- Options for Texinfo output ------------------------------------------------
247-
248-
# Grouping the document tree into Texinfo files. List of tuples
249-
# (source start file, target name, title, author,
250-
# dir menu entry, description, category)
251-
#texinfo_documents = [
252-
# ('index', 'IoC', u'IoC Documentation',
253-
# u'Thomas Rabaix', 'IoC', 'One line description of project.',
254-
# 'Miscellaneous'),
255-
#]
256-
257-
# Documents to append as an appendix to all manuals.
258-
#texinfo_appendices = []
259-
260-
# If false, no module index is generated.
261-
#texinfo_domain_indices = True
262-
263-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
264-
#texinfo_show_urls = 'footnote'

docs/reference/advanced_configuration.rst

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,29 @@
44
Advanced Configuration
55
======================
66

7-
.. configuration-block::
7+
.. code-block:: yaml
88
9-
.. code-block:: yaml
9+
sonata_classification:
10+
class:
11+
tag: App\Entity\SonataClassificationTag
12+
category: App\Entity\SonataClassificationCategory
13+
collection: App\Entity\SonataClassificationCollection
14+
context: App\Entity\SonataClassificationContext
1015
11-
sonata_classification:
12-
class:
13-
tag: App\Entity\SonataClassificationTag
14-
category: App\Entity\SonataClassificationCategory
15-
collection: App\Entity\SonataClassificationCollection
16-
context: App\Entity\SonataClassificationContext
17-
18-
admin:
19-
tag:
20-
class: Sonata\ClassificationBundle\Admin\TagAdmin
21-
controller: Sonata\AdminBundle\Controller\CRUDController
22-
translation: SonataClassificationBundle
23-
category:
24-
class: Sonata\ClassificationBundle\Admin\CategoryAdmin
25-
controller: Sonata\ClassificationBundle\Controller\CategoryAdminController
26-
translation: SonataClassificationBundle
27-
collection:
28-
class: Sonata\ClassificationBundle\Admin\CollectionAdmin
29-
controller: Sonata\AdminBundle\Controller\CRUDController
30-
translation: SonataClassificationBundle
31-
context:
32-
class: Sonata\ClassificationBundle\Admin\ContextAdmin
33-
controller: Sonata\AdminBundle\Controller\CRUDController
34-
translation: SonataClassificationBundle
16+
admin:
17+
tag:
18+
class: Sonata\ClassificationBundle\Admin\TagAdmin
19+
controller: Sonata\AdminBundle\Controller\CRUDController
20+
translation: SonataClassificationBundle
21+
category:
22+
class: Sonata\ClassificationBundle\Admin\CategoryAdmin
23+
controller: Sonata\ClassificationBundle\Controller\CategoryAdminController
24+
translation: SonataClassificationBundle
25+
collection:
26+
class: Sonata\ClassificationBundle\Admin\CollectionAdmin
27+
controller: Sonata\AdminBundle\Controller\CRUDController
28+
translation: SonataClassificationBundle
29+
context:
30+
class: Sonata\ClassificationBundle\Admin\ContextAdmin
31+
controller: Sonata\AdminBundle\Controller\CRUDController
32+
translation: SonataClassificationBundle

docs/requirements.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#
33
# It's auto-generated by sonata-project/dev-kit package.
44

5-
Pygments==2.9.0
6-
sphinx==1.8.5
7-
git+https://github.com/fabpot/sphinx-php.git@v2.0.2#egg_name=sphinx-php
8-
sphinx_rtd_theme==0.5.2
9-
jinja2==3.0.3
5+
Pygments==2.15.1
6+
sphinx==6.2.1
7+
sphinx_rtd_theme==1.2.0

0 commit comments

Comments
 (0)